pickImage method

Future<String?> pickImage()

打开原生文件选择对话框,返回所选图片路径(取消返回 null)。

Implementation

Future<String?> pickImage() async {
  _log('pickImage: calling native picker');
  try {
    return await _channel.invokeMethod<String>('pickImage');
  } on PlatformException catch (e) {
    _log('pickImage: PlatformException code=${e.code} message=${e.message}');
    rethrow;
  }
}