Commit bc2fc3be by daniel.roek

Platform interface nullsafety migration

parent 323dd288
## 3.0.0-nullsafety
* Migrated to null safety.
## 2.0.2 ## 2.0.2
* Added support for the limited photos permission available on iOS 14 and up. * Added support for the limited photos permission available on iOS 14 and up.
......
...@@ -51,8 +51,10 @@ class MethodChannelPermissionHandler extends PermissionHandlerPlatform { ...@@ -51,8 +51,10 @@ class MethodChannelPermissionHandler extends PermissionHandlerPlatform {
/// Returns [true] if the app settings page could be opened, otherwise /// Returns [true] if the app settings page could be opened, otherwise
/// [false]. /// [false].
Future<bool> openAppSettings() async { Future<bool> openAppSettings() async {
final wasOpened = await _methodChannel.invokeMethod('openAppSettings'); final wasOpened =
return wasOpened; await _methodChannel.invokeMethod('openAppSettings');
return wasOpened ?? false;
} }
/// Requests the user for access to the supplied list of [Permission]s, if /// Requests the user for access to the supplied list of [Permission]s, if
...@@ -77,6 +79,6 @@ class MethodChannelPermissionHandler extends PermissionHandlerPlatform { ...@@ -77,6 +79,6 @@ class MethodChannelPermissionHandler extends PermissionHandlerPlatform {
final shouldShowRationale = await _methodChannel.invokeMethod( final shouldShowRationale = await _methodChannel.invokeMethod(
'shouldShowRequestPermissionRationale', permission.value); 'shouldShowRequestPermissionRationale', permission.value);
return shouldShowRationale; return shouldShowRationale ?? false;
} }
} }
...@@ -3,20 +3,20 @@ description: A common platform interface for the permission_handler plugin. ...@@ -3,20 +3,20 @@ description: A common platform interface for the permission_handler plugin.
homepage: https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface homepage: https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a # NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.0.2 version: 3.0.0-nullsafety
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
meta: ^1.0.5 meta: ^1.0.5
plugin_platform_interface: ^1.0.2 plugin_platform_interface: ^1.1.0-nullsafety
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
mockito: ^4.1.1 mockito: ^5.0.0-nullsafety
effective_dart: ^1.2.1 effective_dart: ^1.3.0
environment: environment:
sdk: ">=2.6.0 <3.0.0" sdk: ">=2.12.0-0 <3.0.0"
flutter: ">=1.9.1+hotfix.4 <2.0.0" flutter: ">=1.9.1+hotfix.4 <2.0.0"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment