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

TensorFlow Train/test /evaluation flow

AttributeError : module 'tensorflow' has no attribute 'global_variables_initializer'

AttributeError: module 'tensorflow_estimator.python.estimator.api._v2.estimator' has no attribute 'inputs'