title: State's build() method keep get called when I am using image_picker and image_crop library in iOS device only
body: <p>I am using these two libraries for picking and cropping images from gallery or camera (<a href="https://pub.dartlang.org/packages/image_picker" rel="nofollow noreferrer">image_picker</a> and <a href="https://pub.dartlang.org/packages/image_cropper" rel="nofollow noreferrer">image_cropper</a>) when I select image from gallery and want to perform further operation then <code>build</code> method is called automatically and changes the flow of my code. </p>
  
  <p>In android devices this code is working fine and <code>build</code> method is called only once, but in iOS device <code>build</code> is called when I select image from gallery and after I crop this image.</p>
  
  <p>In iOS devices as the device's photo library opened then <code>build</code> method is called and when crop is called then again <code>build</code> method is called of Drawer class. </p>
  
  <p>This issue is occurring in Drawer only, if I call my TextRobo class as <code>Navigator.of(context).pushReplacementNamed('/textRobo');</code> then this works fine. </p>
  
  <p><strong>Drawer Class</strong></p>
  
  <pre><code>_getDrawerItemWidget(int pos, String title) {
  
  
    switch (pos) {
      case 0:
        if(title.contains("From Gallery"))
  
          return new TextRobo();
        if(title.contains("From Camera"))
          return new TextRoboCamera();
        else if(widget.fragment_class.contains("Translate"))
          return new TranslateLangue(widget.textToTranslate);
        else
          return new TranslateLangue("");
  
  
        break;
  
      case 1:
  
        if(title.contains("From Gallery"))
          return new BarCodeRobo();
        else
          return new BarCodeQuick();
  
        break;
      case 2:
        return new TranslateLangue("");
  
    //default:
    //return new TranslateLangue("");
    }
  
  
  }
  
  @override
  Widget build(BuildContext context) {
  
  print('Building widget');
  
  
  return new Scaffold(
  
  appBar: new AppBar(
    iconTheme: new IconThemeData(color: Colors.white),
    title: new Text("RoboScan",
      style: new TextStyle(color: Colors.white),),
  ),
  
    drawer: new Drawer(
      child: new ListView(
        children: &lt;Widget&gt;[
          new Container( height: 140.0, color: Colors.orange,
          child: new Center(child:
            new Text('RoboScan', style: new TextStyle(color: Colors.white,
            fontSize:25.0, fontWeight: FontWeight.bold),
            ),
          ),
          ),
          new Column(
              children: drawerOptions)
        ],
      ),
  
    ),
    body: _getDrawerItemWidget(_selectedDrawerIndex, widget.fragment_class  ),
  );
  }
  </code></pre>
  
  <p><strong>Image Picker and Crop class(TextRobo)</strong></p>
  
  <pre><code> File _imageFile;
   List&lt;VisionText&gt; _currentTextLabels = &lt;VisionText&gt;[];
   FirebaseVisionTextDetector textDetector = 
   FirebaseVisionTextDetector.instance;
  
  
   @override
   void initState() {
   // TODO: implement initState
  //scanImage();
   super.initState();
  
   _getAndScanImage();
  
   }
  
  
  Future&lt;void&gt; _getAndScanImage() async {
  setState(() {
    _imageFile = null;
   // _imageSize = null;
  });
  
   final File imageFile =
   await ImagePicker.pickImage(source: ImageSource.gallery);
  
  
   _cropImage(imageFile);
  
  }
  </code></pre>