Alystrasz / grant_and_activate

Checks permissions and activate related services in Flutter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grant_and_activate

This package is a plugin for Flutter, to programmatically request permission for a given feature, plus activation of the related service.

This plugin does not display any message, it is up to developers to display permissions/services status to the user.

This plugin is intended to be supported on Android and iOS, but has been tested on Android only.

Usage

Result result = checkPermissionsAndActivateServices([Feature.Bluetooth, Feature.Location]);
if (result.allOk) {
  // Permissions have been granted and services are currently active
} else {
  // Permissions have not been granted and/or services are not active
  if (!result.getStatus(Feature.Bluetooth))
    print("This application requires you to activate Bluetooth.");
}

Supported features

  • Bluetooth
  • BluetoothConnect
  • BluetoothScan
  • Location
  • LocationAlways
  • LocationWhenInUse

About

Checks permissions and activate related services in Flutter.

License:MIT License


Languages

Language:Dart 61.9%Language:HTML 19.4%Language:Ruby 15.9%Language:Swift 2.0%Language:Kotlin 0.6%Language:Objective-C 0.2%