Commit a7174c3d by Martijn van Dijk

Update docs

parent f2489489
## 2.0.0
* Make methods non static so users can create an instance or override
## 1.0.1
* Converted the plugin into a library so that developers don't have to import additional files;
......
......@@ -22,7 +22,7 @@ To use this plugin, add `permission_handler` as a [dependency in your pubspec.ya
```yaml
dependencies:
permission_handler: '^1.0.1'
permission_handler: '^2.0.0'
```
> **NOTE:** There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. See issue [Flutter#16049](https://github.com/flutter/flutter/issues/16049) for help on integration.
......@@ -34,7 +34,7 @@ dependencies:
``` dart
import 'package:permission_handler/permission_handler.dart';
Map<PermissionGroup, PermissionStatus> permissions = await PermissionHandler.requestPermissions([PermissionGroup.contacts]);
Map<PermissionGroup, PermissionStatus> permissions = await PermissionHandler().requestPermissions([PermissionGroup.contacts]);
```
### Checking permission
......@@ -42,7 +42,7 @@ Map<PermissionGroup, PermissionStatus> permissions = await PermissionHandler.req
``` dart
import 'package:permission_handler/permission_handler.dart';
PermissionStatus permission = await PermissionHandler.checkPermissionStatus(PermissionGroup.contacts);
PermissionStatus permission = await PermissionHandler().checkPermissionStatus(PermissionGroup.contacts);
```
### Open app settings
......@@ -50,7 +50,7 @@ PermissionStatus permission = await PermissionHandler.checkPermissionStatus(Perm
``` dart
import 'package:permission_handler/permission_handler.dart';
bool isOpened = await PermissionHandler.openAppSettings();
bool isOpened = await PermissionHandler().openAppSettings();
```
### Show a rationale for requesting permission (Android only)
......@@ -58,7 +58,7 @@ bool isOpened = await PermissionHandler.openAppSettings();
``` dart
import 'package:permission_handler/permission_handler.dart';
bool isShown = await PermissionHandler.shouldShowRequestPermissionRationale(PermissionGroup.contacts);
bool isShown = await PermissionHandler().shouldShowRequestPermissionRationale(PermissionGroup.contacts);
```
This will always return `false` on iOS.
......
name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version: 1.0.1
version: 2.0.0
author: Baseflow <hello@baseflow.com>
homepage: https://github.com/baseflowit/flutter-permission-handler
......@@ -18,7 +18,7 @@ flutter:
pluginClass: PermissionHandlerPlugin
environment:
sdk: ">=2.0.0-dev.58.0 <3.0.0"
sdk: ">=2.0.0-dev.68.0 <3.0.0"
# To add assets to your plugin package, add an assets section, like this:
# assets:
......
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