I am trying to upload the image in flutter web app but ImagePicker is not working for web app and i am using another plugin ImagePickerWeb but it is also doesn't seem to be working.
File image;
// image = await ImagePickerWeb.getImage(outputType: ImageType.file);
Image i = await ImagePickerWeb.getImage(outputType: ImageType.widget);
print("imageeeeee");
// print(i.toString());
if(i!=null){
File temp = await ImageUtils.imageToFile(imageName: i.toString(),ext: "jpg");
// print(image.path);
// image = (await FlutterWebImagePicker.getImage) as File;
// print("printing image from gallery $image");
image = temp;
// final picker = ImagePicker();
// final pickedFile = await picker.getImage(source: ImageSource.gallery);
// print('PickedFile: ${pickedFile.toString()}');
if(image!=null){
setState(() {
// image = File(pickedFile.path);
model.image = image;
_image = image;
final bytes = image.readAsBytesSync();
String _img64 = base64Encode(bytes);
imageModel.value = "data:image/png;base64," + _img64;
});
}}
print("printing image");