requestEnableLocationServices static method

Future<bool> requestEnableLocationServices()

Requests the user to enable location services by showing an in app modal on android and opening location settings on iOS.

Implementation

static Future<bool> requestEnableLocationServices() async {
  if (Platform.isAndroid) {
    final bool result = await _channel
        .invokeMethod(OkHiNativeMethod.requestEnableLocationServices);
    return result;
  } else {
    throw OkHiException(
      code: OkHiException.unsupportedPlatformCode,
      message: OkHiException.unsupportedPlatformMessage,
    );
  }
}