From b62b60d9df8b3b31120738c9e8400eaa2cf44f29 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 20 Apr 2025 19:01:14 -0400 Subject: [PATCH 1/2] Minor bug: avoid showing empty dialog when notifications tapped (#2250) --- lib/providers/notifications_provider.dart | 38 ++++++++++++----------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/providers/notifications_provider.dart b/lib/providers/notifications_provider.dart index 63b8000..bc329cf 100644 --- a/lib/providers/notifications_provider.dart +++ b/lib/providers/notifications_provider.dart @@ -197,26 +197,28 @@ class NotificationsProvider { } _showNotificationPayload(String? payload, {bool doublePop = false}) { - var title = (payload ?? '\n\n').split('\n').first; - var content = (payload ?? '\n\n').split('\n').sublist(1).join('\n'); - globalNavigatorKey.currentState?.push( - PageRouteBuilder( - pageBuilder: (context, _, __) => AlertDialog( - title: Text(title), - content: Text(content), - actions: [ - TextButton( - onPressed: () { - Navigator.of(context).pop(null); - if (doublePop) { + if (payload?.isNotEmpty == true) { + var title = (payload ?? '\n\n').split('\n').first; + var content = (payload ?? '\n\n').split('\n').sublist(1).join('\n'); + globalNavigatorKey.currentState?.push( + PageRouteBuilder( + pageBuilder: (context, _, __) => AlertDialog( + title: Text(title), + content: Text(content), + actions: [ + TextButton( + onPressed: () { Navigator.of(context).pop(null); - } - }, - child: Text(tr('ok'))), - ], + if (doublePop) { + Navigator.of(context).pop(null); + } + }, + child: Text(tr('ok'))), + ], + ), ), - ), - ); + ); + } } Future cancel(int id) async { From c7c6731732a8bd1b8a86d5bfefff242b1695fdf2 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Tue, 22 Apr 2025 18:50:47 -0400 Subject: [PATCH 2/2] Upgrade packages, increment version --- pubspec.lock | 36 ++++++++++++++++++------------------ pubspec.yaml | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index eda27db..77a7349 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -184,10 +184,10 @@ packages: dependency: "direct main" description: name: connectivity_plus - sha256: "04bf81bb0b77de31557b58d052b24b3eee33f09a6e7a8c68a3e247c7df19ec27" + sha256: "051849e2bd7c7b3bc5844ea0d096609ddc3a859890ec3a9ac4a65a2620cc1f99" url: "https://pub.dev" source: hosted - version: "6.1.3" + version: "6.1.4" connectivity_plus_platform_interface: dependency: transitive description: @@ -240,10 +240,10 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: "306b78788d1bb569edb7c55d622953c2414ca12445b41c9117963e03afc5c513" + sha256: "0c6396126421b590089447154c5f98a5de423b70cfb15b1578fd018843ee6f53" url: "https://pub.dev" source: hosted - version: "11.3.3" + version: "11.4.0" device_info_plus_platform_interface: dependency: transitive description: @@ -506,10 +506,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "5a1e6fb2c0561958d7e4c33574674bda7b77caaca7a33b758876956f2902eea3" + sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e url: "https://pub.dev" source: hosted - version: "2.0.27" + version: "2.0.28" flutter_test: dependency: "direct dev" description: flutter @@ -716,10 +716,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "0ca7359dad67fd7063cb2892ab0c0737b2daafd807cf1acecd62374c8fae6c12" + sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9 url: "https://pub.dev" source: hosted - version: "2.2.16" + version: "2.2.17" path_provider_foundation: dependency: transitive description: @@ -876,18 +876,18 @@ packages: dependency: "direct main" description: name: share_plus - sha256: fce43200aa03ea87b91ce4c3ac79f0cecd52e2a7a56c7a4185023c271fbfa6da + sha256: b2961506569e28948d75ec346c28775bb111986bb69dc6a20754a457e3d97fa0 url: "https://pub.dev" source: hosted - version: "10.1.4" + version: "11.0.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - sha256: cc012a23fc2d479854e6c80150696c4a5f5bb62cb89af4de1c505cf78d0a5d0b + sha256: "1032d392bc5d2095a77447a805aa3f804d2ae6a4d5eef5e6ebb3bd94c1bc19ef" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.0.0" shared_preferences: dependency: "direct main" description: @@ -900,10 +900,10 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: c2c8c46297b5d6a80bed7741ec1f2759742c77d272f1a1698176ae828f8e1a18 + sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.10" shared_preferences_foundation: dependency: transitive description: @@ -1107,10 +1107,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "1d0eae19bd7606ef60fe69ef3b312a437a16549476c42321d5dc1506c9ca3bf4" + sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79" url: "https://pub.dev" source: hosted - version: "6.3.15" + version: "6.3.16" url_launcher_ios: dependency: transitive description: @@ -1203,10 +1203,10 @@ packages: dependency: transitive description: name: webview_flutter_android - sha256: "3315f1306eb22f98c48fe203fb8a448fb23f9e49d55a4da6e17ab7d795774166" + sha256: "5c3b6f992d123084903ec091b84f021c413a92a9af49038e4564a1b26c8452cf" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.4.1" webview_flutter_platform_interface: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 16b3d66..accf96e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.50+2307 +version: 1.1.51+2308 environment: sdk: ^3.6.0 @@ -57,7 +57,7 @@ dependencies: git: url: https://github.com/ImranR98/android_package_manager ref: master - share_plus: ^10.0.0 + share_plus: ^11.0.0 sqflite: ^2.2.0+3 easy_localization: ^3.0.1 android_intent_plus: ^5.0.1