<ol dir="auto">
<li>I follow the steps on the official website.
<ul dir="auto">
<li>clone the beta version</li>
<li>set the environment variable</li>
<li>run flutter doctor</li>
</ul>
</li>
<li>when  i make these steps:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  Building flutter tool...
The setter 'readEventsEnabled=' was called on null.
Receiver: null
Tried calling: readEventsEnabled=false
package:pub/src/source/hosted.dart 339                                                     BoundHostedSource._throwFriendlyError
package:pub/src/source/hosted.dart 141                                                     BoundHostedSource.doGetVersions
===== asynchronous gap ===========================
package:pub/src/source.dart 169                                                            BoundSource.getVersions
package:pub/src/solver/version_solver.dart 237                                             SolverCache.getVersions.&lt;fn&gt;
dart:async                                                                                 runZoned
package:pub/src/http.dart 267                                                              withDependencyType
package:pub/src/solver/version_solver.dart 236                                             SolverCache.getVersions
===== asynchronous gap ===========================
package:pub/src/solver/unselected_package_queue.dart 121                                   UnselectedPackageQueue._getNumVersions
===== asynchronous gap ===========================
package:pub/src/solver/unselected_package_queue.dart 50                                    UnselectedPackageQueue.add
===== asynchronous gap ===========================
package:pub/src/solver/version_selection.dart 88                                           VersionSelection._addDependencies
===== asynchronous gap ===========================
package:pub/src/solver/version_selection.dart 63                                           VersionSelection.select
===== asynchronous gap ===========================
package:pub/src/solver/backtracking_solver.dart 174                                        BacktrackingSolver.solve
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 42                                              resolveVersions.&lt;fn&gt;
package:pub/src/log.dart 409                                                               progress
package:pub/src/solver/version_solver.dart 40                                              resolveVersions
package:pub/src/entrypoint.dart 195                                                        Entrypoint.acquireDependencies
===== asynchronous gap ===========================
package:pub/src/command/upgrade.dart 41                                                    UpgradeCommand.run
===== asynchronous gap ===========================
package:args/command_runner.dart 194                                                       CommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 167                                                    PubCommandRunner.runCommand.&lt;fn&gt;
dart:async                                                                                 new Future.sync
package:pub/src/utils.dart 103                                                             captureErrors.&lt;fn&gt;
dart:async                                                                                 runZoned
package:pub/src/utils.dart 122                                                             captureErrors
package:pub/src/command_runner.dart 167                                                    PubCommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 116                                                    PubCommandRunner.run
===== asynchronous gap ===========================
/b/build/slave/Linux_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart 8  main
This is an unexpected error. Please run

    pub --trace upgrade --verbosity=error --no-packages-dir"><pre class="notranslate"><code class="notranslate">  Building flutter tool...
The setter 'readEventsEnabled=' was called on null.
Receiver: null
Tried calling: readEventsEnabled=false
package:pub/src/source/hosted.dart 339                                                     BoundHostedSource._throwFriendlyError
package:pub/src/source/hosted.dart 141                                                     BoundHostedSource.doGetVersions
===== asynchronous gap ===========================
package:pub/src/source.dart 169                                                            BoundSource.getVersions
package:pub/src/solver/version_solver.dart 237                                             SolverCache.getVersions.&lt;fn&gt;
dart:async                                                                                 runZoned
package:pub/src/http.dart 267                                                              withDependencyType
package:pub/src/solver/version_solver.dart 236                                             SolverCache.getVersions
===== asynchronous gap ===========================
package:pub/src/solver/unselected_package_queue.dart 121                                   UnselectedPackageQueue._getNumVersions
===== asynchronous gap ===========================
package:pub/src/solver/unselected_package_queue.dart 50                                    UnselectedPackageQueue.add
===== asynchronous gap ===========================
package:pub/src/solver/version_selection.dart 88                                           VersionSelection._addDependencies
===== asynchronous gap ===========================
package:pub/src/solver/version_selection.dart 63                                           VersionSelection.select
===== asynchronous gap ===========================
package:pub/src/solver/backtracking_solver.dart 174                                        BacktrackingSolver.solve
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 42                                              resolveVersions.&lt;fn&gt;
package:pub/src/log.dart 409                                                               progress
package:pub/src/solver/version_solver.dart 40                                              resolveVersions
package:pub/src/entrypoint.dart 195                                                        Entrypoint.acquireDependencies
===== asynchronous gap ===========================
package:pub/src/command/upgrade.dart 41                                                    UpgradeCommand.run
===== asynchronous gap ===========================
package:args/command_runner.dart 194                                                       CommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 167                                                    PubCommandRunner.runCommand.&lt;fn&gt;
dart:async                                                                                 new Future.sync
package:pub/src/utils.dart 103                                                             captureErrors.&lt;fn&gt;
dart:async                                                                                 runZoned
package:pub/src/utils.dart 122                                                             captureErrors
package:pub/src/command_runner.dart 167                                                    PubCommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 116                                                    PubCommandRunner.run
===== asynchronous gap ===========================
/b/build/slave/Linux_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart 8  main
This is an unexpected error. Please run

    pub --trace upgrade --verbosity=error --no-packages-dir
</code></pre></div>
<p dir="auto">what's wrong with my operations.<br>
thanks <g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji></p>
<p dir="auto">I found an issue in <a href="https://pub.dartlang.org/packages/image_picker" rel="nofollow">image picker library</a> in ios only, the cancel button in the navigation bar is not visible if I access camera first. But its working in Andriod.<br>
When I look into the library implementation if found that the image picker controller object reference is missing when camera usage is done. So I tried re-initializing the object each time when we use image picker and deallocating after use manually. It was working fine.<br>
Here what i have done.</p>
<div class="highlight highlight-source-objc notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- (void)showCamera {
  // Camera is not available on simulators
    _imagePickerController = [[UIImagePickerController alloc] init];
    _imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
    _imagePickerController.delegate = self;
    _imagePickerController.mediaTypes = @[ (NSString *)kUTTypeImage ];
  if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
    _imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
    [_viewController presentViewController:_imagePickerController animated:YES completion:nil];
  } else {
    [[[UIAlertView alloc] initWithTitle:@&quot;Error&quot;
                                message:@&quot;Camera not available.&quot;
                               delegate:nil
                      cancelButtonTitle:@&quot;OK&quot;
                      otherButtonTitles:nil] show];
  }
}

- (void)showPhotoLibrary {
  // No need to check if SourceType is available. It always is.
    _imagePickerController = [[UIImagePickerController alloc] init];
    _imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
    _imagePickerController.delegate = self;
    _imagePickerController.mediaTypes = @[ (NSString *)kUTTypeImage ];
  _imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    [_viewController presentViewController:_imagePickerController animated:YES completion: nil];
}

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
  [_imagePickerController dismissViewControllerAnimated:YES completion:nil];
  _result(nil);

  _result = nil;
  _arguments = nil;
    _imagePickerController = nil;
}"><pre class="notranslate">- (<span class="pl-k">void</span>)showCamera {
  <span class="pl-c"><span class="pl-c">//</span> Camera is not available on simulators</span>
    _imagePickerController = [[UIImagePickerController <span class="pl-c1">alloc</span>] <span class="pl-c1">init</span>];
    _imagePickerController.<span class="pl-smi">modalPresentationStyle</span> = UIModalPresentationCurrentContext;
    _imagePickerController.<span class="pl-smi">delegate</span> = self;
    _imagePickerController.<span class="pl-smi">mediaTypes</span> = @[ (<span class="pl-c1">NSString</span> *)<span class="pl-c1">kUTTypeImage</span> ];
  <span class="pl-k">if</span> ([UIImagePickerController <span class="pl-c1">isSourceTypeAvailable:</span>UIImagePickerControllerSourceTypeCamera]) {
    _imagePickerController.<span class="pl-smi">sourceType</span> = UIImagePickerControllerSourceTypeCamera;
    [_viewController <span class="pl-c1">presentViewController:</span>_imagePickerController <span class="pl-c1">animated:</span><span class="pl-c1">YES</span> <span class="pl-c1">completion:</span><span class="pl-c1">nil</span>];
  } <span class="pl-k">else</span> {
    [[[UIAlertView <span class="pl-c1">alloc</span>] <span class="pl-c1">initWithTitle:</span><span class="pl-s"><span class="pl-pds">@"</span>Error<span class="pl-pds">"</span></span>
                                <span class="pl-c1">message:</span><span class="pl-s"><span class="pl-pds">@"</span>Camera not available.<span class="pl-pds">"</span></span>
                               <span class="pl-c1">delegate:</span><span class="pl-c1">nil</span>
                      <span class="pl-c1">cancelButtonTitle:</span><span class="pl-s"><span class="pl-pds">@"</span>OK<span class="pl-pds">"</span></span>
                      <span class="pl-c1">otherButtonTitles:</span><span class="pl-c1">nil</span>] <span class="pl-c1">show</span>];
  }
}

- (<span class="pl-k">void</span>)showPhotoLibrary {
  <span class="pl-c"><span class="pl-c">//</span> No need to check if SourceType is available. It always is.</span>
    _imagePickerController = [[UIImagePickerController <span class="pl-c1">alloc</span>] <span class="pl-c1">init</span>];
    _imagePickerController.<span class="pl-smi">modalPresentationStyle</span> = UIModalPresentationCurrentContext;
    _imagePickerController.<span class="pl-smi">delegate</span> = self;
    _imagePickerController.<span class="pl-smi">mediaTypes</span> = @[ (<span class="pl-c1">NSString</span> *)<span class="pl-c1">kUTTypeImage</span> ];
  _imagePickerController.<span class="pl-smi">sourceType</span> = UIImagePickerControllerSourceTypePhotoLibrary;
    [_viewController <span class="pl-c1">presentViewController:</span>_imagePickerController <span class="pl-c1">animated:</span><span class="pl-c1">YES</span> <span class="pl-c1">completion:</span> <span class="pl-c1">nil</span>];
}

- (<span class="pl-k">void</span>)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
  [_imagePickerController <span class="pl-c1">dismissViewControllerAnimated:</span><span class="pl-c1">YES</span> <span class="pl-c1">completion:</span><span class="pl-c1">nil</span>];
  <span class="pl-c1">_result</span>(<span class="pl-c1">nil</span>);

  _result = <span class="pl-c1">nil</span>;
  _arguments = <span class="pl-c1">nil</span>;
    _imagePickerController = <span class="pl-c1">nil</span>;
}</pre></div>
<p dir="auto">Please fix the issue as soon as possible.</p>