barrierDismissible and onWillPop
This commit is contained in:
parent
61722f5b8e
commit
9dadd76a8d
@ -59,7 +59,7 @@ class DialogManager {
|
||||
|
||||
static void reset([result]) {
|
||||
if (_dialogContext != null) {
|
||||
Navigator.pop(_dialogContext!,result);
|
||||
Navigator.pop(_dialogContext!, result);
|
||||
}
|
||||
_dialogContext = null;
|
||||
}
|
||||
@ -83,7 +83,7 @@ class DialogManager {
|
||||
builder: (context) {
|
||||
DialogManager.register(context);
|
||||
return StatefulBuilder(
|
||||
builder: (_, setState) => builder(setState,DialogManager.reset));
|
||||
builder: (_, setState) => builder(setState, DialogManager.reset));
|
||||
});
|
||||
DialogManager.drop();
|
||||
return res;
|
||||
|
@ -135,8 +135,12 @@ void showServer() {
|
||||
},
|
||||
child: Text(translate('OK')),
|
||||
),
|
||||
]);
|
||||
});
|
||||
],
|
||||
onWillPop: () async {
|
||||
return true;
|
||||
},
|
||||
);
|
||||
}, barrierDismissible: true);
|
||||
}
|
||||
|
||||
String? validate(value) {
|
||||
@ -169,18 +173,10 @@ void showAbout() {
|
||||
)),
|
||||
)),
|
||||
]),
|
||||
actions: [
|
||||
TextButton(
|
||||
style: flatButtonStyle,
|
||||
onPressed: () {
|
||||
close();
|
||||
},
|
||||
child: Text(translate('OK')),
|
||||
)
|
||||
],
|
||||
actions: [],
|
||||
onWillPop: () async {
|
||||
return true;
|
||||
},
|
||||
);
|
||||
});
|
||||
}, barrierDismissible: true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user