getGrantedSamsungHealthDataPermissions static method

Future<List<String>> getGrantedSamsungHealthDataPermissions({
  1. required String connectionId,
})

Implementation

static Future<List<String>> getGrantedSamsungHealthDataPermissions({
  required String connectionId,
}) async {
  if (!Platform.isAndroid) {
    throw Exception('getGrantedSamsungHealthDataPermissions method is only available on Android');
  }

  final result = await _channel.invokeMethod('getGrantedSamsungHealthDataPermissions', {
    'connectionId': connectionId,
  });

  // print('getGrantedSamsungHealthDataPermissions result: $result');
  ExceptionHandler.checkException(result);

  if (result is List) {
    return result.map((item) => item.toString()).toList();
  } else {
    throw Exception('Expected a List but got ${result.runtimeType}');
  }
}