你好,我使用的是Flutter相机插件,它的功能正常。但我的主要问题是在拍照时无法告诉插件图片文件名,在Kotlin中可以使用以下方式:
photoUri = FileProvider.getUriForFile(requireActivity(), "io.awesomedomain", photoFile) // build uri on the app storage space and specific file name -> photoFile.
captureImageIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri) // define the pic name before picture is actually taken by the camera.
startActivityForResult(captureImageIntent, REQUEST_PHOTO) // start the camera
我目前只是在flutter相机插件返回图片XFile后重命名它的文件名,但这种方法不太优化,所以我想知道是否有遗漏的地方。是否可以事先指定flutter相机插件中的文件名?
我目前使用的是最新版本:camera: ^0.7.0+2