requestPermission method

Future<bool> requestPermission()

请求地图相关权限

Implementation

Future<bool> requestPermission() async {
  ///make no effect to ios
  var sdkInt = 23;

  if (Platform.isAndroid) {
    var info = await DeviceInfoPlugin().androidInfo;
    sdkInt = info.version.sdkInt;
  }
  if (sdkInt >= 23) {
    return await _permissionChannel.invokeMethod('requestPermission') ;
//          .then((result) => result );
  } else {
    ///when under sdk 23 (exclusive)
    ///permissions already declared in manifest and granted when downloaded
    return true;
  }
}