openSystemCamera function

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

打开系统相机 返回文件路径 Android AndroidManifest.xml 添加以下内容 ios info.plist add ios path 包含 file:///

Implementation

Future<String?> openSystemCamera({String? savePath}) async {
  /// savePath => android 图片临时储存位置 (仅支持android)
  if (!supportPlatformMobile) return null;
  String? path =
      await curiosityChannel.invokeMethod('openSystemCamera', savePath);
  if (savePath != null) path = savePath;
  return path;
}