Created
May 24, 2022 11:34
-
-
Save TobiCrackIT/be9228d99109aeee66b912dcb7f5b703 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:zoro/app/app.logger.dart'; | |
import 'package:get/get.dart'; | |
import 'package:zoro/ui/widgets/dialog/custom_dialog.dart'; | |
class CustomDialogService { | |
final log = getLogger('CustomDialogService'); | |
showCustomDialog({String? title, String? description,Function()? onPressed}) { | |
showDialog( | |
context: Get.overlayContext!, | |
barrierDismissible: true, | |
barrierColor: Color.fromRGBO(0, 0, 0, 0.4), | |
builder: (_) => CustomDialog( | |
title: title!, | |
description: description!, | |
onPositiveButtonPressed:onPressed , | |
), | |
); | |
} | |
showAutoSaveDialog({String? title, String? description,Function()? onPressed}) { | |
showDialog( | |
context: Get.overlayContext!, | |
barrierDismissible: true, | |
barrierColor: Color.fromRGBO(0, 0, 0, 0.4), | |
builder: (_) => AutoSaveDialog( | |
title: title!, | |
description: description!, | |
onPositiveButtonPressed:onPressed , | |
), | |
); | |
} | |
showWithdrawalDialog({String? title, String? description,Function()? onPressed}) { | |
showDialog( | |
context: Get.overlayContext!, | |
barrierDismissible: false, | |
barrierColor: Color.fromRGBO(0, 0, 0, 0.4), | |
builder: (_) => WithdrawalDialog( | |
title: title!, | |
description: description!, | |
onPositiveButtonPressed:onPressed , | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment