From 1d0c959606486d4b294319d839032dfd4e2820cd Mon Sep 17 00:00:00 2001 From: BreX900 Date: Mon, 16 Oct 2023 14:15:45 +0200 Subject: [PATCH] chore(kuama_permissions): bump permission_handler package version feat: updated dart sdk constraints to support dart 3.0.0 --- CHANGELOG.md | 4 ++++ kuama_core/pubspec.yaml | 4 ++-- .../lib/src/utils/permissions_utils.dart | 3 +++ kuama_permissions/pubspec.yaml | 18 +++++++++--------- .../test/blocs/permissions_bloc_test.dart | 6 +++--- kuama_position/pubspec.yaml | 6 +++--- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3a1cd2..98e9fb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 1.1.0 (2024-09-16) +- feat: updated dart sdk constraints to support dart 3.0.0 +- chore(kuama_permissions): bump permission_handler package version + ## 1.0.1 (2023-04-14) - fix(kuama_permissions): bloc state hash - style: align projects to mek_lints 1.0.0 diff --git a/kuama_core/pubspec.yaml b/kuama_core/pubspec.yaml index f40592b..8931fd7 100644 --- a/kuama_core/pubspec.yaml +++ b/kuama_core/pubspec.yaml @@ -1,10 +1,10 @@ name: kuama_core description: A starting point for Dart libraries or applications. publish_to: 'none' -version: 1.0.1 +version: 1.1.0 environment: - sdk: '>=2.18.0 <3.0.0' + sdk: '>=3.0.0 <4.0.0' scripts: build:index: dart pub global run index_generator diff --git a/kuama_permissions/lib/src/utils/permissions_utils.dart b/kuama_permissions/lib/src/utils/permissions_utils.dart index 918bb61..990fcde 100644 --- a/kuama_permissions/lib/src/utils/permissions_utils.dart +++ b/kuama_permissions/lib/src/utils/permissions_utils.dart @@ -9,6 +9,7 @@ extension MapPermissionStatus on PermissionStatus { R Function()? denied, R Function()? permanentlyDenied, R Function()? granted, + R Function()? provisional, required R Function() orElse, }) { switch (this) { @@ -20,6 +21,8 @@ extension MapPermissionStatus on PermissionStatus { return orElse(); case PermissionStatus.limited: return orElse(); + case PermissionStatus.provisional: + return (provisional ?? orElse)(); case PermissionStatus.permanentlyDenied: return (permanentlyDenied ?? orElse)(); } diff --git a/kuama_permissions/pubspec.yaml b/kuama_permissions/pubspec.yaml index 1005d0c..ad7637c 100644 --- a/kuama_permissions/pubspec.yaml +++ b/kuama_permissions/pubspec.yaml @@ -1,15 +1,15 @@ name: kuama_permissions description: A starting point for Dart libraries or applications. publish_to: 'none' -version: 1.0.1 +version: 1.1.0 environment: - sdk: '>=2.18.0 <3.0.0' - flutter: ">=3.3.0" + sdk: '>=3.0.0 <4.0.0' + flutter: ">=3.10.0" scripts: # To generate .g files: - build:watch: flutter pub run build_runner watch --delete-conflicting-outputs + build:watch: dart run build_runner watch --delete-conflicting-outputs # To generate library file build:index: dart pub global run index_generator @@ -23,8 +23,8 @@ dependencies: path: kuama_core ref: 1.0.1 - permission_handler_platform_interface: ^3.9.0 - permission_handler: ^10.2.0 + permission_handler_platform_interface: ^3.12.0 + permission_handler: ^11.0.1 shared_preferences: ^2.1.0 meta: # Version defined in kuama_core @@ -34,7 +34,7 @@ dependencies: bloc: ^8.1.1 bloc_concurrency: ^0.2.1 - mek_data_class: ^1.0.1 + mek_data_class: ^1.4.0 dev_dependencies: mek_lints: ^1.0.0 @@ -44,8 +44,8 @@ dev_dependencies: mocktail: ^0.3.0 - build_runner: ^2.3.3 - mek_data_class_generator: ^1.1.1 + build_runner: ^2.4.6 + mek_data_class_generator: ^1.5.1 dependency_overrides: kuama_core: diff --git a/kuama_permissions/test/blocs/permissions_bloc_test.dart b/kuama_permissions/test/blocs/permissions_bloc_test.dart index e4ea50d..ce57bf2 100644 --- a/kuama_permissions/test/blocs/permissions_bloc_test.dart +++ b/kuama_permissions/test/blocs/permissions_bloc_test.dart @@ -53,7 +53,7 @@ void main() { when(() => mockState.checkCanCheck(any())).thenReturn(false); - bloc.check({Permission.calendar}); + bloc.check({Permission.calendarReadOnly}); expect(bloc.state, state); }); @@ -127,7 +127,7 @@ void main() { when(() => mockState.checkCanRequest(any())).thenReturn(false); - bloc.request({Permission.calendar}); + bloc.request({Permission.calendarReadOnly}); expect(bloc.state, state); }); @@ -309,7 +309,7 @@ void main() { when(() => mockState.checkCanAsk(any())).thenReturn(false); - bloc.ask({Permission.calendar}); + bloc.ask({Permission.calendarReadOnly}); expect(bloc.state, state); }); diff --git a/kuama_position/pubspec.yaml b/kuama_position/pubspec.yaml index 0e0ec34..f68fbba 100644 --- a/kuama_position/pubspec.yaml +++ b/kuama_position/pubspec.yaml @@ -1,11 +1,11 @@ name: kuama_position description: A new Flutter project. publish_to: 'none' -version: 1.0.1 +version: 1.1.0 environment: - sdk: '>=2.18.0 <3.0.0' - flutter: ">=3.3.0" + sdk: '>=3.0.0 <4.0.0' + flutter: ">=3.10.0" scripts: # To generate library file