mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-26 18:34:55 +00:00
push temp list logic before saving
This commit is contained in:
@ -14,7 +14,8 @@ extension ContextExtension on BuildContext {
|
||||
|
||||
double get height => MediaQuery.sizeOf(this).height;
|
||||
|
||||
InputDecorationTheme get inputDecoration => Theme.of(this).inputDecorationTheme;
|
||||
InputDecorationTheme get inputDecoration =>
|
||||
Theme.of(this).inputDecorationTheme;
|
||||
|
||||
TextStyle get displayLarge => Theme.of(this).textTheme.displayLarge!;
|
||||
|
||||
@ -59,8 +60,12 @@ extension ContextExtension on BuildContext {
|
||||
);
|
||||
}
|
||||
|
||||
void customAlertDialog(
|
||||
{required Widget alertBody, required String title, required VoidCallback onConfirm}) {
|
||||
void customAlertDialog({
|
||||
required Widget alertBody,
|
||||
required String title,
|
||||
required VoidCallback onConfirm,
|
||||
VoidCallback? onDismiss,
|
||||
}) {
|
||||
showDialog(
|
||||
context: this,
|
||||
builder: (BuildContext context) {
|
||||
@ -109,13 +114,15 @@ extension ContextExtension on BuildContext {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
onTap: onDismiss ??
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Center(
|
||||
child: BodyMedium(
|
||||
text: 'Cancel',
|
||||
style: context.bodyMedium.copyWith(color: ColorsManager.greyColor),
|
||||
style: context.bodyMedium
|
||||
.copyWith(color: ColorsManager.greyColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -129,8 +136,8 @@ extension ContextExtension on BuildContext {
|
||||
child: Center(
|
||||
child: BodyMedium(
|
||||
text: 'Confirm',
|
||||
style: context.bodyMedium
|
||||
.copyWith(color: ColorsManager.primaryColorWithOpacity),
|
||||
style: context.bodyMedium.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user