Commit 523f53ff by daniel.roek

permission handler nullsafety migration

parent bc2fc3be
......@@ -74,18 +74,18 @@ class BaseflowPluginExample extends StatelessWidget {
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
class AppHome extends StatefulWidget {
/// 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
/// title bar.
final String title;
final String? title;
@override
_AppHomeState createState() => _AppHomeState();
......
......@@ -2,7 +2,7 @@ name: permission_handler_example
description: Demonstrates how to use the permission_handler plugin.
environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.12.0-0 <3.0.0"
dependencies:
flutter:
......@@ -15,7 +15,7 @@ dev_dependencies:
permission_handler:
path: ../
url_launcher: ^5.4.11
url_launcher: ^6.0.0-nullsafety.6
flutter:
uses-material-design: true
......
......@@ -46,7 +46,8 @@ extension PermissionActions on Permission {
///
/// Returns the new [PermissionStatus].
Future<PermissionStatus> request() async {
return (await [this].request())[this];
final permissionStatus = (await [this].request())[this];
return permissionStatus!;
}
}
......
name: permission_handler
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
flutter:
......@@ -15,13 +15,13 @@ flutter:
dependencies:
flutter:
sdk: flutter
meta: ^1.1.6
permission_handler_platform_interface: ^2.0.2
meta: ^1.3.0
permission_handler_platform_interface: ^3.0.0-nullsafety
dev_dependencies:
effective_dart: ^1.2.1
plugin_platform_interface: ^1.0.1
effective_dart: ^1.3.0
plugin_platform_interface: ^1.0.3
environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.12.0-0 <3.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