From f88b775af3b64b6bc5d3312417b68bfb75d55ac2 Mon Sep 17 00:00:00 2001 From: csf Date: Wed, 20 Apr 2022 23:43:19 +0800 Subject: [PATCH] dialog clickMaskDismiss --- lib/common.dart | 3 ++- lib/pages/remote_page.dart | 2 +- lib/pages/scan_page.dart | 2 +- lib/pages/settings_page.dart | 2 +- pubspec.lock | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/common.dart b/lib/common.dart index 677c8700e..1b722c78f 100644 --- a/lib/common.dart +++ b/lib/common.dart @@ -95,7 +95,7 @@ class DialogManager { } static Future show(DialogBuilder builder, - {bool barrierDismissible = false, + {bool clickMaskDismiss = false, String? tag, bool useAnimation = true}) async { final t; @@ -112,6 +112,7 @@ class DialogManager { }; final res = await SmartDialog.show( tag: t, + clickMaskDismiss: clickMaskDismiss, useAnimation: useAnimation, builder: (_) => StatefulBuilder( builder: (_, setState) => builder(setState, close))); diff --git a/lib/pages/remote_page.dart b/lib/pages/remote_page.dart index 642d24de8..574d7f553 100644 --- a/lib/pages/remote_page.dart +++ b/lib/pages/remote_page.dart @@ -880,7 +880,7 @@ void showOptions() { onWillPop: () async => true, contentPadding: 0, ); - }, barrierDismissible: true); + }, clickMaskDismiss: true); } void showSetOSPassword(bool login) { diff --git a/lib/pages/scan_page.dart b/lib/pages/scan_page.dart index c2e3961a3..22084ec52 100644 --- a/lib/pages/scan_page.dart +++ b/lib/pages/scan_page.dart @@ -248,7 +248,7 @@ void showServerSettingsWithValue( return true; }, ); - }, barrierDismissible: true); + }, clickMaskDismiss: true); } String? validate(value) { diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index ed4103f24..becf23a6d 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -122,7 +122,7 @@ void showAbout() { return true; }, ); - }, barrierDismissible: true); + }, clickMaskDismiss: true); } Future login(String name, String pass) async { diff --git a/pubspec.lock b/pubspec.lock index af2dde1ed..825bd92a0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -228,7 +228,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: d04ceaa243e7a7883065a41b1008627ceeafc0ff + resolved-ref: c89ce60664cbc206cb98c1f407e86b8a766f4c0e url: "https://github.com/Heap-Hop/flutter_smart_dialog.git" source: git version: "4.0.0"