feat: implement dialog callback

This commit is contained in:
Kingtous
2023-05-08 12:34:19 +08:00
parent 19f81ad317
commit 77fa807b57
55 changed files with 734 additions and 554 deletions

View File

@@ -152,7 +152,7 @@ class FileModel {
String title, String content, bool showCheckbox, bool isIdentical) async {
fileConfirmCheckboxRemember = false;
return await parent.target?.dialogManager.show<bool?>(
(setState, Function(bool? v) close) {
(setState, Function(bool? v) close, context) {
cancel() => close(false);
submit() => close(true);
return CustomAlertDialog(
@@ -547,7 +547,7 @@ class FileController {
Future<bool?> showRemoveDialog(
String title, String content, bool showCheckbox) async {
return await dialogManager?.show<bool>((setState, Function(bool v) close) {
return await dialogManager?.show<bool>((setState, Function(bool v) close, context) {
cancel() => close(false);
submit() => close(true);
return CustomAlertDialog(