Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #633 from egovernments/develop
Browse files Browse the repository at this point in the history
PFM-4658
  • Loading branch information
rahuldevgarg authored Oct 26, 2023
2 parents d7996c9 + 8502784 commit 71e03e7
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ class _ConsumerCollectPaymentViewState extends State<ConsumerCollectPayment> {
return ValueListenableBuilder<bool>(
valueListenable: clickedStatus,
builder: (context,bool isClicked,_) {
return isClicked?Loaders.loaderBox(context,text: ""):Align(
return isClicked?Loaders.loaderBoxCircularLoader(context,text: ""):Align(
alignment: Alignment.center,
child: ConfirmationPopUp(
textString: i18.payment.CORE_AMOUNT_CONFIRMATION,
Expand Down
53 changes: 47 additions & 6 deletions frontend/mgramseva/lib/utils/loaders.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Loaders {
});
}

static void showLoader(BuildContext context, {String? text}) {
static void showLoader(BuildContext context, {String? text, Color? loaderColor , Color? textColor}) {
showDialog(
context: context,
barrierColor: Colors.black.withOpacity(0.2),
Expand All @@ -77,14 +77,14 @@ class Loaders {
alignment: WrapAlignment.center,
children: [
SpinKitCircle(
color: Colors.white,
color: loaderColor??Colors.white,
size: 50.0,
),
Text(
text ??
' Getting image data \n Please check the values once done. ',
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white),
style: TextStyle(color: textColor??Colors.white),
),
],
)),
Expand All @@ -93,7 +93,7 @@ class Loaders {
);
});
}
static Widget loaderBox(BuildContext context, {String? text}){
static Widget loaderBox(BuildContext context, {String? text, Color? loaderColor , Color? textColor}){
return WillPopScope(
onWillPop: () async => false,
child: Dialog(
Expand All @@ -120,14 +120,55 @@ class Loaders {
alignment: WrapAlignment.center,
children: [
SpinKitCircle(
color: Colors.white,
color: loaderColor??Colors.white,
size: 50.0,
),
Text(
text ??
' Getting image data \n Please check the values once done. ',
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white),
style: TextStyle(color: textColor??Colors.white),
),
],
)),
),
),
);
}
static Widget loaderBoxCircularLoader(BuildContext context, {String? text, Color? loaderColor , Color? textColor}){
return WillPopScope(
onWillPop: () async => false,
child: Dialog(
// backgroundColor:CustomColors.BLACK,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(15)),
child: WillPopScope(
onWillPop: () async {
return true;
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle
),
alignment: Alignment.center,
constraints: BoxConstraints(
minHeight: 160,
maxHeight: 180
),
width: MediaQuery.of(context).size.width > 720 ? MediaQuery.of(context).size.width / 3.5 : MediaQuery.of(context).size.width ,
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Wrap(
runSpacing: 15,
alignment: WrapAlignment.center,
children: [
CircularProgressIndicator(
color: loaderColor??Theme.of(context).primaryColor,
),
Text(
text ??
' Getting image data \n Please check the values once done. ',
textAlign: TextAlign.center,
style: TextStyle(color: textColor??Colors.white),
),
],
)),
Expand Down

0 comments on commit 71e03e7

Please sign in to comment.