full screen loading added
This commit is contained in:
@@ -25,6 +25,7 @@ class AddOrViewPatient extends StatefulWidget {
|
|||||||
class _AddOrViewPatientState extends State<AddOrViewPatient> {
|
class _AddOrViewPatientState extends State<AddOrViewPatient> {
|
||||||
late double width;
|
late double width;
|
||||||
late double height;
|
late double height;
|
||||||
|
late Widget loading;
|
||||||
|
|
||||||
Future<Patient?> fetchPatient() async {
|
Future<Patient?> fetchPatient() async {
|
||||||
//print("Patien manager page: $endpoint");
|
//print("Patien manager page: $endpoint");
|
||||||
@@ -77,12 +78,14 @@ class _AddOrViewPatientState extends State<AddOrViewPatient> {
|
|||||||
widget.arguments.type,
|
widget.arguments.type,
|
||||||
));
|
));
|
||||||
} else if (snapshot.connectionState == ConnectionState.waiting) {
|
} else if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
return Container(
|
loading = Container(
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
child: const Mihloadingcircle(),
|
child: const Mihloadingcircle(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return loading;
|
||||||
} else {
|
} else {
|
||||||
return AddPatient(signedInUser: widget.arguments.signedInUser);
|
return AddPatient(signedInUser: widget.arguments.signedInUser);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user