Commit 523f53ff by daniel.roek

permission handler nullsafety migration

parent bc2fc3be
...@@ -74,18 +74,18 @@ class BaseflowPluginExample extends StatelessWidget { ...@@ -74,18 +74,18 @@ class BaseflowPluginExample extends StatelessWidget {
1, 1,
); );
} }
return MaterialColor(color.value, swatch); return MaterialColor(color.value, swatch as Map<int, Color>);
} }
} }
/// A Flutter example demonstrating how the [pluginName] plugin could be used /// A Flutter example demonstrating how the [pluginName] plugin could be used
class AppHome extends StatefulWidget { class AppHome extends StatefulWidget {
/// Constructs the [AppHome] class /// Constructs the [AppHome] class
AppHome({Key key, this.title}) : super(key: key); AppHome({Key? key, this.title}) : super(key: key);
/// The [title] of the application, which is shown in the application's /// The [title] of the application, which is shown in the application's
/// title bar. /// title bar.
final String title; final String? title;
@override @override
_AppHomeState createState() => _AppHomeState(); _AppHomeState createState() => _AppHomeState();
......
...@@ -2,7 +2,7 @@ name: permission_handler_example ...@@ -2,7 +2,7 @@ name: permission_handler_example
description: Demonstrates how to use the permission_handler plugin. description: Demonstrates how to use the permission_handler plugin.
environment: environment:
sdk: ">=2.1.0 <3.0.0" sdk: ">=2.12.0-0 <3.0.0"
dependencies: dependencies:
flutter: flutter:
...@@ -15,7 +15,7 @@ dev_dependencies: ...@@ -15,7 +15,7 @@ dev_dependencies:
permission_handler: permission_handler:
path: ../ path: ../
url_launcher: ^5.4.11 url_launcher: ^6.0.0-nullsafety.6
flutter: flutter:
uses-material-design: true uses-material-design: true
......
...@@ -46,7 +46,8 @@ extension PermissionActions on Permission { ...@@ -46,7 +46,8 @@ extension PermissionActions on Permission {
/// ///
/// Returns the new [PermissionStatus]. /// Returns the new [PermissionStatus].
Future<PermissionStatus> request() async { Future<PermissionStatus> request() async {
return (await [this].request())[this]; final permissionStatus = (await [this].request())[this];
return permissionStatus!;
} }
} }
......
name: permission_handler name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions. description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version: 5.1.0+2 version: 6.0.0-nullsafety
homepage: https://github.com/baseflowit/flutter-permission-handler homepage: https://github.com/baseflowit/flutter-permission-handler
flutter: flutter:
...@@ -15,13 +15,13 @@ flutter: ...@@ -15,13 +15,13 @@ flutter:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
meta: ^1.1.6 meta: ^1.3.0
permission_handler_platform_interface: ^2.0.2 permission_handler_platform_interface: ^3.0.0-nullsafety
dev_dependencies: dev_dependencies:
effective_dart: ^1.2.1 effective_dart: ^1.3.0
plugin_platform_interface: ^1.0.1 plugin_platform_interface: ^1.0.3
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.12.0-0 <3.0.0"
flutter: ">=1.12.8 <2.0.0" flutter: ">=1.12.8 <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