我知道有很多这样的数据问答,但是我如何将图像传递到另一个屏幕?我不知道,我被困了四天,请帮助...
_getFromGallery() async {
XFile? pickedFile = await ImagePicker().pickImage(
source: ImageSource.gallery,
maxWidth: 1800,
maxHeight: 1800,
);
_cropImage(pickedFile!.path);
_cropImage(pickedFile) async {
File? croppedImage = await ImageCropper.cropImage(
sourcePath: pickedFile,
maxWidth: 1080,
maxHeight: 1080,
);
if (croppedImage != null) {
image = croppedImage;
setState(() {
});
}
} }
我需要这个裁剪的图像
class CreatePage extends StatefulWidget
任何帮助将不胜感激!