Fix pop up windows with input. make more dynamic
This commit is contained in:
@@ -28,7 +28,7 @@ class _MedcertinputState extends State<Medcertinput> {
|
||||
//height: 325,
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 50.0),
|
||||
//const SizedBox(height: 50.0),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: MIHDateField(
|
||||
|
||||
@@ -80,6 +80,8 @@ class _MedicineSearchState extends State<MedicineSearch> {
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 5.0),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -89,8 +91,9 @@ class _MedicineSearchState extends State<MedicineSearch> {
|
||||
"Select Medicine",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color:
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
color: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
fontSize: 35.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -104,7 +107,8 @@ class _MedicineSearchState extends State<MedicineSearch> {
|
||||
height: 400,
|
||||
child: Mihloadingcircle(),
|
||||
);
|
||||
} else if (snapshot.hasData && snapshot.data!.isNotEmpty) {
|
||||
} else if (snapshot.hasData &&
|
||||
snapshot.data!.isNotEmpty) {
|
||||
final medsList = snapshot.data!;
|
||||
return SizedBox(
|
||||
height: 400,
|
||||
@@ -120,7 +124,8 @@ class _MedicineSearchState extends State<MedicineSearch> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
"No Match Found\nPlease close and manually capture medicine",
|
||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||
style:
|
||||
TextStyle(fontSize: 25, color: Colors.grey),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
@@ -131,6 +136,7 @@ class _MedicineSearchState extends State<MedicineSearch> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 5,
|
||||
right: 5,
|
||||
|
||||
@@ -17,7 +17,25 @@ class MIHBody extends StatefulWidget {
|
||||
class _MIHBodyState extends State<MIHBody> {
|
||||
//double paddingSize = 10;
|
||||
|
||||
double getPaddingSize() {
|
||||
double getHorizontalPaddingSize(Size screenSize) {
|
||||
if (MzanziInnovationHub.of(context)!.theme.screenType == "desktop") {
|
||||
if (widget.borderOn) {
|
||||
return 10;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
// mobile
|
||||
if (widget.borderOn) {
|
||||
return 10;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double getVerticalPaddingSize(Size screenSize) {
|
||||
// mobile
|
||||
if (widget.borderOn) {
|
||||
return 10;
|
||||
} else {
|
||||
@@ -54,9 +72,9 @@ class _MIHBodyState extends State<MIHBody> {
|
||||
Size screenSize = MediaQuery.sizeOf(context);
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: getPaddingSize(),
|
||||
right: getPaddingSize(),
|
||||
bottom: getPaddingSize(),
|
||||
left: getHorizontalPaddingSize(screenSize),
|
||||
right: getHorizontalPaddingSize(screenSize),
|
||||
bottom: getVerticalPaddingSize(screenSize),
|
||||
top: 0,
|
||||
),
|
||||
child: Container(
|
||||
@@ -64,7 +82,7 @@ class _MIHBodyState extends State<MIHBody> {
|
||||
left: 10,
|
||||
right: 10,
|
||||
bottom: 10,
|
||||
top: getPaddingSize(),
|
||||
top: getVerticalPaddingSize(screenSize),
|
||||
),
|
||||
width: screenSize.width,
|
||||
height: screenSize.height,
|
||||
|
||||
@@ -40,7 +40,8 @@ class _MIHLayoutBuilderState extends State<MIHLayoutBuilder> {
|
||||
Widget build(BuildContext context) {
|
||||
Size screenSize = MediaQuery.sizeOf(context);
|
||||
return Scaffold(
|
||||
body: SizedBox(
|
||||
body: SafeArea(
|
||||
child: SizedBox(
|
||||
width: screenSize.width,
|
||||
height: screenSize.height,
|
||||
child: Stack(
|
||||
@@ -55,6 +56,7 @@ class _MIHLayoutBuilderState extends State<MIHLayoutBuilder> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 5.0),
|
||||
),
|
||||
child: Padding(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -130,7 +130,7 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 5.0),
|
||||
),
|
||||
child: Padding(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -144,7 +144,7 @@ class _BuildPatientsListState extends State<BuildPatientsList> {
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 5.0),
|
||||
),
|
||||
child: Padding(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -263,6 +263,8 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 5.0),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -292,8 +294,9 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
textColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
textColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
onTap: () async {
|
||||
if (isMedCertFieldsFilled()) {
|
||||
await generateMedCert();
|
||||
@@ -313,6 +316,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 5,
|
||||
right: 5,
|
||||
@@ -354,6 +358,8 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 5.0),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -370,7 +376,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 25.0),
|
||||
//const SizedBox(height: 25.0),
|
||||
PrescripInput(
|
||||
medicineController: medicineController,
|
||||
quantityController: quantityController,
|
||||
@@ -387,6 +393,7 @@ class _PatientFilesState extends State<PatientFiles> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 5,
|
||||
right: 5,
|
||||
|
||||
@@ -158,8 +158,10 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
width: 5.0),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
//mainAxisSize: MainAxisSize.max,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Add Note",
|
||||
@@ -213,7 +215,9 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
Expanded(
|
||||
SizedBox(
|
||||
width: 700,
|
||||
height: 250,
|
||||
child: MIHMLTextField(
|
||||
controller: noteTextController,
|
||||
hintText: "Note Details",
|
||||
@@ -244,13 +248,15 @@ class _PatientNotesState extends State<PatientNotes> {
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
textColor:
|
||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
textColor: MzanziInnovationHub.of(context)!
|
||||
.theme
|
||||
.primaryColor(),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 5,
|
||||
right: 5,
|
||||
|
||||
@@ -344,6 +344,8 @@ class _PrescripInputState extends State<PrescripInput> {
|
||||
Widget displayMedInput() {
|
||||
return Column(
|
||||
children: [
|
||||
const SizedBox(height: 25.0),
|
||||
|
||||
KeyboardListener(
|
||||
focusNode: _focusNode,
|
||||
autofocus: true,
|
||||
|
||||
Reference in New Issue
Block a user