openSystemCamera method

Future<String?> openSystemCamera({
  1. GalleryOptions? options,
})

打开系统相机 返回文件路径 Android AndroidManifest.xml 添加以下内容

Implementation

Future<String?> openSystemCamera({GalleryOptions? options}) async {
  if (!supportPlatformMobile) return null;
  options ??= GalleryOptions();
  String? path =
      await channel.invokeMethod('openSystemCamera', options.toMap());
  if (isAndroid && options.savePath != null) path = options.savePath;
  return path;
}