requestAuthorization static method

Future<bool> requestAuthorization(
  1. List<String> toRead,
  2. List<String> toWrite
)

Request write/read access to various HealthKit types. Provide toRead and/or toWrite. If you want only read data, please set toWrite as an empty array. Types you can work with are grouped as Enums:

Implementation

static Future<bool> requestAuthorization(
    List<String> toRead, List<String> toWrite) async {
  final arguments = {
    'toRead': toRead,
    'toWrite': toWrite,
  };
  return await _methodChannel.invokeMethod('requestAuthorization', arguments);
}