From d162d16f46f2842d39c61f2c5f1ce4230a85c76b Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 23 Dec 2024 12:44:20 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=90=9B=20Fix=20potential=20nil=20clas?= =?UTF-8?q?s=20value=20when=20unwrapping=20caught=20exceptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/ResultHandler.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/ResultHandler.m b/ios/Classes/ResultHandler.m index e981eb25..95ea6697 100644 --- a/ios/Classes/ResultHandler.m +++ b/ios/Classes/ResultHandler.m @@ -59,7 +59,7 @@ - (void)replyError:(NSObject *)value { NSString *details = exception.callStackSymbols ? [exception.callStackSymbols componentsJoinedByString:@"\n"] : @"No stack trace available."; flutterError = [FlutterError errorWithCode:code message:message details:details]; } else { - NSString *code = NSStringFromClass([value class]); + NSString *code = NSStringFromClass([value class]) ?: @"UnknownException"; NSString *message = [NSString stringWithFormat:@"%@", [value description]]; flutterError = [FlutterError errorWithCode:code message:message details:nil]; } From 8c36a4dcd0fcaf6652215e36d76c3f48b47c8f7f Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 23 Dec 2024 12:45:09 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=94=96=203.6.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ pubspec.yaml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5a921b6..6982a27d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ To know more about breaking changes, see the [Migration Guide][]. *None.* +## 3.6.4 + +### Fixes + +- Fix potential nil class value when unwrapping caught exceptions on Darwin. + ## 3.6.3 ### Improvements diff --git a/pubspec.yaml b/pubspec.yaml index 06136085..70b5dd59 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: photo_manager description: A Flutter plugin that provides album assets abstraction management APIs on Android, iOS, macOS, and OpenHarmony. repository: https://github.com/fluttercandies/flutter_photo_manager -version: 3.6.3 +version: 3.6.4 environment: sdk: ">=2.13.0 <4.0.0" From 656b0f4ff48a07dab91ad2f8d0c23353da3694ea Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 23 Dec 2024 13:55:39 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=8E=A8=20--?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/internal/enums.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/src/internal/enums.dart b/lib/src/internal/enums.dart index 3f91ab19..3daf8d3f 100644 --- a/lib/src/internal/enums.dart +++ b/lib/src/internal/enums.dart @@ -168,8 +168,6 @@ extension PMDarwinAssetCollectionTypeExt on PMDarwinAssetCollectionType { /// /// The define of the subtype of the collection. /// -///
-/// /// ```objc /// typedef NS_ENUM(NSInteger, PHAssetCollectionSubtype) { /// @@ -210,8 +208,6 @@ extension PMDarwinAssetCollectionTypeExt on PMDarwinAssetCollectionType { /// PHAssetCollectionSubtypeAny = NSIntegerMax /// }; /// ``` -/// -///
enum PMDarwinAssetCollectionSubtype { // PHAssetCollectionTypeAlbum regular subtypes albumRegular, From 3255cb0a4452b29195cc4f0be22868bcfe3dd630 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 23 Dec 2024 14:28:10 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=8E=A8=20--?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/lib/page/developer/verbose_log_page.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/example/lib/page/developer/verbose_log_page.dart b/example/lib/page/developer/verbose_log_page.dart index 6f9e81ec..fb36882c 100644 --- a/example/lib/page/developer/verbose_log_page.dart +++ b/example/lib/page/developer/verbose_log_page.dart @@ -124,11 +124,12 @@ class _VerboseLogPageState extends State { final item = logList[index]; return ListTile( title: content(item.log), - tileColor: item.isResultLog - ? Colors.green.withOpacity(0.1) - : item.isInvokeLog - ? Colors.blue.withOpacity(0.1) - : null, + tileColor: (item.isResultLog + ? Colors.green + : item.isInvokeLog + ? Colors.blue + : null) + ?.withAlpha(16), subtitle: item.swTime != null ? Text('Time: ${item.swTime}ms') : null, From 7af7b90bb24ea8855ddb33183176f423c65b6e3c Mon Sep 17 00:00:00 2001 From: Alex Li Date: Mon, 23 Dec 2024 14:31:27 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=92=9A=20Fix=20dart=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/runnable.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/runnable.yml b/.github/workflows/runnable.yml index d2b50a8d..5d6493c9 100644 --- a/.github/workflows/runnable.yml +++ b/.github/workflows/runnable.yml @@ -46,10 +46,8 @@ jobs: # run: flutter analyze example_ohos - name: Run tests run: flutter test - - name: Generate docs - run: | - dart pub global activate dartdoc - dart pub global run dartdoc . + - name: Dry run docs generate + run: dart doc --dry-run . publishable: if: github.repository == 'fluttercandies/flutter_photo_manager' @@ -87,7 +85,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - permissions: + permissions: pull-requests: write issues: write steps: