这是使用复制功能时的错误。如何保存从相机点击的图像?
Future _takePicture() async {
final imageFile = await ImagePicker().getImage(
source: ImageSource.camera,
maxHeight: 600,
);
setState(() {
_storedImage = File(imageFile.path);
});
final appDir = await syspaths.getApplicationDocumentsDirectory();
final fileName = path.basename(imageFile.path);
final savedImage = await imageFile.copy('${appDir.path}/$fileName');
}