Fixed loading indicator with message
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
|
|||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_business_profile_preview.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_business_profile_preview.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_personal_profile_preview.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_personal_profile_preview.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_location_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_location_services.dart';
|
||||||
@@ -182,6 +183,35 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
Center(
|
||||||
|
child: MihButton(
|
||||||
|
onPressed: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return const Mihloadingcircle(
|
||||||
|
message: "Getting your profile data",
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
buttonColor:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
elevation: 10,
|
||||||
|
width: 300,
|
||||||
|
child: Text(
|
||||||
|
"Show Loading",
|
||||||
|
style: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -51,36 +51,45 @@ class _MihloadingcircleState extends State<Mihloadingcircle> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Dialog(
|
return Dialog(
|
||||||
child: Container(
|
child: IntrinsicWidth(
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
child: IntrinsicHeight(
|
||||||
width: 250,
|
child: Container(
|
||||||
height: 275,
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
decoration: BoxDecoration(
|
// width: 250,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
// height: 275,
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
width: 5.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
),
|
border: Border.all(
|
||||||
child: Column(
|
color:
|
||||||
children: [
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
GifView.asset(
|
width: 5.0),
|
||||||
MzanziInnovationHub.of(context)!.theme.loadingImageLocation(),
|
|
||||||
height: 200,
|
|
||||||
width: 200,
|
|
||||||
frameRate: 30,
|
|
||||||
),
|
),
|
||||||
widget.message != null
|
child: Column(
|
||||||
? Text(
|
mainAxisSize: MainAxisSize.min,
|
||||||
widget.message!,
|
children: [
|
||||||
style: TextStyle(
|
GifView.asset(
|
||||||
fontSize: 15,
|
MzanziInnovationHub.of(context)!
|
||||||
fontWeight: FontWeight.bold,
|
.theme
|
||||||
),
|
.loadingImageLocation(),
|
||||||
)
|
height: 200,
|
||||||
: SizedBox(),
|
width: 200,
|
||||||
],
|
frameRate: 30,
|
||||||
)),
|
),
|
||||||
|
widget.message != null
|
||||||
|
? Text(
|
||||||
|
widget.message!,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: SizedBox(),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user