grant_and_activate 0.0.8 copy "grant_and_activate: ^0.0.8" to clipboard
grant_and_activate: ^0.0.8 copied to clipboard

Activate services and ask for associated permissions with a single method call.

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
3
likes
120
pub points
55%
popularity

Publisher

verified publisherremyraes.com

Activate services and ask for associated permissions with a single method call.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

bluetooth_enable_fork, flutter, location, permission_handler

More

Packages that depend on grant_and_activate