openSystemSettings method

Future<void> openSystemSettings()

Open the system settings to help changing the permissions.

Implementation

Future<void> openSystemSettings() {
  return status.maybeMap(
    disabled: (isServiceAvailable) async {
      if (!isServiceAvailable) {
        await Geolocator.openLocationSettings();
      } else {
        await Geolocator.openAppSettings();
      }
    },
    orElse: () async {
      await Geolocator.openAppSettings();
    },
  );
}