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

PFM-4658 #633

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading