I'm using image picker to get the image , and once it's uploaded , I'd like to pass and display it on a different screen. now I'm getting this error
Use XFile?<\/code>
with
pickImage()<\/code> .
void _openCamera(BuildContext context) async {
final XFile? pickedFile = await ImagePicker().pickImage(
source: ImageSource.camera,
);
if (pickedFile == null) return;
Navigator.of(context)
.push(MaterialPageRoute(builder: (_) => second(image: pickedFile)));
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.