Skip to content

Commit

Permalink
SmartDialog.config.checkExist() adjust to SmartDialog.checkExist()
Browse files Browse the repository at this point in the history
  • Loading branch information
xdd666t committed Aug 11, 2024
1 parent d91c306 commit 836d7ba
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# [4.9.7+x]
# [4.9.8+x]
* SmartDialog.config.checkExist() adjust to SmartDialog.checkExist()

* # [4.9.7+x]
* optimize bindWidget, when bindWidget is not null, bindPage will be automatically set to false.
* Reconstruct the implementation of initialization
* Show Debug Paint: fix [#109](https://github.com/fluttercandies/flutter_smart_dialog/issues/109), [#115](https://github.com/fluttercandies/flutter_smart_dialog/issues/115)
Expand Down
1 change: 1 addition & 0 deletions lib/src/config/smart_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class SmartConfig {
/// if the tag attribute is used, dialogTypes will be invalid
///
/// 检查相关dialog是否存在于界面上,如果使用tag属性,dialogTypes将失效
@Deprecated("please use SmartDialog.checkExist()")
bool checkExist({
String? tag,
Set<SmartAllDialogType> dialogTypes = const {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/helper/navigator_observer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SmartNavigatorObserver extends NavigatorObserver {
return;
}

var checkDialog = SmartDialog.config.checkExist(dialogTypes: {
var checkDialog = SmartDialog.checkExist(dialogTypes: {
SmartAllDialogType.custom,
SmartAllDialogType.attach,
SmartAllDialogType.loading,
Expand Down
16 changes: 16 additions & 0 deletions lib/src/smart_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'compatible/compatible_smart_dialog.dart';
import 'config/smart_config.dart';
import 'data/animation_param.dart';
import 'helper/dialog_proxy.dart';
import 'kit/dialog_kit.dart';
import 'widget/attach_dialog_widget.dart';
import 'widget/helper/dialog_scope.dart';

Expand Down Expand Up @@ -908,4 +909,19 @@ class SmartDialog {
force: force,
);
}

/// Check whether the relevant dialog exists on the interface,
/// if the tag attribute is used, dialogTypes will be invalid
///
/// 检查相关dialog是否存在于界面上,如果使用tag属性,dialogTypes将失效
static bool checkExist({
String? tag,
Set<SmartAllDialogType> dialogTypes = const {
SmartAllDialogType.custom,
SmartAllDialogType.attach,
SmartAllDialogType.loading,
},
}) {
return DialogKit.instance.checkExist(tag: tag, dialogTypes: dialogTypes);
}
}
2 changes: 1 addition & 1 deletion lib/src/widget/helper/smart_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class _SmartOverlayState extends State<SmartOverlay> {
}

await showCompleter?.future;
var dialogExist = SmartDialog.config.checkExist(dialogTypes: {
var dialogExist = SmartDialog.checkExist(dialogTypes: {
SmartAllDialogType.custom,
SmartAllDialogType.attach,
SmartAllDialogType.notify,
Expand Down
2 changes: 1 addition & 1 deletion macos/Flutter/ephemeral/Flutter-Generated.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FLUTTER_APPLICATION_PATH=D:\Develop\GitHub\flutter_smart_dialog
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=4.9.7
FLUTTER_BUILD_NUMBER=4
FLUTTER_BUILD_NUMBER=10
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
Expand Down
2 changes: 1 addition & 1 deletion macos/Flutter/ephemeral/flutter_export_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export "FLUTTER_APPLICATION_PATH=D:\Develop\GitHub\flutter_smart_dialog"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=4.9.7"
export "FLUTTER_BUILD_NUMBER=4"
export "FLUTTER_BUILD_NUMBER=10"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description:
An elegant Flutter Dialog solution,
Easily implement Toast, Loading and custom Dialog,
Make the use of the dialog easier!
version: 4.9.7+9
version: 4.9.8
homepage: https://github.com/fluttercandies/flutter_smart_dialog
# flutter pub publish --server=https://pub.dartlang.org
# flutter build web --release --base-href="/flutter_smart_dialog/web/"
Expand Down

0 comments on commit 836d7ba

Please sign in to comment.