The method 'pickIamge' isn't defined for the type 'ImagePicker'.

The method 'pickIamge' isn't defined for the type 'ImagePicker'. Try correcting the name to the name of an existing method, or defining a method named 'pickIamge'.

problem:--

  File imageFile;

  _openGallary() async {
    var picture = await ImagePicker.pickIamge(source: ImageSource.gallery);
    this.setState(() {
      imageFile = picture;
    });
  }

 here with you can simply check _openGallary function for imagepicker .🆗👌


  _openGallary() async {
    var picture = await ImagePicker().getImage(source: ImageSource.gallery);
    this.setState(() {
      imageFile = picture as File;
    });

Comments

Popular posts from this blog

Sri Lankan IT industry & companies

Find Odd & Even number - pseudocode