title: MissingPluginException - shared_preferences, image_picker, etc. Works when flutter_branch_sdk is removed
body: <p>I am banging my head around the internet for a long and could not figure out what is the problem and how to handle it. Please comment if you need any more details.</p>
  <p>Problem: <em>MissingPluginException - <strong>shared_preferences</strong> (No implementation found for method getAll on channel plugins.flutter.io/shared_preferences), <strong>image_picker</strong> (No implementation found for method pickImage), <strong>etc.</strong></em></p>
  <p>Below is my pubspec.yaml</p>
  <pre><code>name: appname
  description: Short courses and live classes
  
  publish_to: 'none'
  
  version: 2.3.2+10
  
  environment:
    sdk: &quot;&gt;=2.7.0 &lt;3.0.0&quot;
  
  dependencies:
    flutter:
      sdk: flutter
  
    flutter_localizations:
      sdk: flutter
  
    cupertino_icons: ^1.0.0
    dio: ^4.0.0
    provider: ^5.0.0
    shared_preferences: ^2.0.5
    image_picker: ^0.7.4
    connectivity: ^3.0.3
    flutter_image_compress: ^1.0.0
    image_cropper: ^1.3.1
    flutter_svg: ^0.19.1
    dotted_border: ^1.0.7
    carousel_slider: ^3.0.0
    after_layout: ^1.0.7+2
    url_launcher: ^6.0.3
    esys_flutter_share: ^1.0.2
    android_play_install_referrer: ^0.1.1
    pull_to_refresh: ^1.6.4
    intl: ^0.17.0
    hashtagtext: ^0.0.1
    flutter_branch_sdk: ^3.0.0 &lt;---- If I remove this, everything works as expected
    flutter_staggered_grid_view: ^0.3.4
    photo_view: ^0.11.1
    agora_rtc_engine: ^3.3.2
    timeago: ^3.0.2
    chewie: ^1.0.0
    video_player: ^2.1.0
    cashfree_pg: 1.2.2+16
    awesome_dialog: ^1.3.2
    firebase_core: ^1.0.2
    firebase_auth: 1.0.1
    firebase_crashlytics: 1.0.0
    firebase_messaging: 9.1.0
    #permission_handler: 5.1.0+2
    #agora_rtm: ^0.9.14
    #line_icons: 1.3.2
    #launch_review: ^2.0.0
    #shimmer: ^1.1.2
    #flutter_slidable: ^0.5.7
    #flutter_instagram_image_picker: ^0.3.1
    #uuid: ^2.0.4
    #device_info: ^1.0.0
    #wakelock: ^0.2.1+1
    #share: ^0.6.5+4
  
  dev_dependencies:
    flutter_test:
      sdk: flutter
  
  flutter:
  
    uses-material-design: true
  
    assets:
      - assets/images/
      - assets/languages/
  
    fonts:
      - family: PingFang
        fonts:
          - asset: assets/fonts/PingFang-SC-Regular.ttf
      - family: OpenSans
        fonts:
          - asset: assets/fonts/OpenSans-Regular.ttf
  </code></pre>
  <p>I tried the below solutions:</p>
  <p><strong>Solution #1</strong> - <a href="https://stackoverflow.com/a/66417139/2456838">https://stackoverflow.com/a/66417139/2456838</a></p>
  <p><strong>Solution #2</strong> - Added <code>SharedPreferences.setMockInitialValues({});</code> to the main method. But all values are returned null on retrival from local storage.</p>
  <p><strong>Solution #3 (Working)</strong> - If I remove <code>flutter_branch_sdk</code> dependency everything works as expected. I tried all the versions of <code>flutter_branch_sdk</code> but none worked.</p>
  <p><strong>Other solutions</strong> - Updated the flutter, dart, Android Studio, etc. Upgraded all the dependencies to major-version. Created a new project with the latest versions of Gradle and all dependencies.</p>
  <p>Below is my flutter doctor</p>
  <pre><code>jdpawar@JD-MBP revofy % flutter doctor --verbose
  [✓] Flutter (Channel stable, 2.0.3, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-GB)
      • Flutter version 2.0.3 at /Users/jdpawar/Projects/flutter-sdk
      • Framework revision 4d7946a68d (2 weeks ago), 2021-03-18 17:24:33 -0700
      • Engine revision 3459eb2436
      • Dart version 2.12.2
  
  [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
      • Android SDK at /Users/jdpawar/Library/Android/sdk
      • Platform android-30, build-tools 29.0.2
      • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
      • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
      • All Android licenses accepted.
  
  [✓] Xcode - develop for iOS and macOS
      • Xcode at /Applications/Xcode.app/Contents/Developer
      • Xcode 12.4, Build version 12D4e
      • CocoaPods version 1.10.1
  
  [✓] Chrome - develop for the web
      • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
  
  [✓] Android Studio (version 4.1)
      • Android Studio at /Applications/Android Studio.app/Contents
      • Flutter plugin can be installed from:
         https://plugins.jetbrains.com/plugin/9212-flutter
      • Dart plugin can be installed from:
         https://plugins.jetbrains.com/plugin/6351-dart
      • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
  
  [✓] VS Code (version 1.55.0)
      • VS Code at /Applications/Visual Studio Code.app/Contents
      • Flutter extension version 3.21.0
  
  [✓] Connected device (2 available)
      • Nokia 6 1 (mobile) • PL2GAR4820502886 • android-arm64  • Android 10 (API 29)
      • Chrome (web)       • chrome           • web-javascript • Google Chrome 89.0.4389.114
  
  • No issues found!
  </code></pre>
  <p><strong>Edit 1:</strong></p>
  <p>I have tried running the code on Mi A1, Nokia 5.1, Simulator - Pixel 2 Q, Pixel 3 XL, etc.</p>
  <p>Below is my AndroidManifest.xml</p>
  <pre><code>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      package=&quot;com.revofy&quot;&gt;
      &lt;!-- io.flutter.app.FlutterApplication is an android.app.Application that
           calls FlutterMain.startInitialization(this); in its onCreate method.
           In most cases you can leave this as-is, but you if you want to provide
           additional functionality it is fine to subclass or reimplement
           FlutterApplication and put your custom class here. --&gt;
  
      &lt;uses-permission android:name=&quot;android.permission.READ_PHONE_STATE&quot;/&gt;
      &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.MODIFY_AUDIO_SETTINGS&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
  
      &lt;!-- The Agora SDK requires Bluetooth permissions in case users are using Bluetooth devices.--&gt;
      &lt;uses-permission android:name=&quot;android.permission.BLUETOOTH&quot; /&gt;
  
      &lt;application
          android:name=&quot;io.flutter.app.FlutterApplication&quot;
          android:label=&quot;revofy&quot;
          requestLegacyExternalStorage=&quot;true&quot;
          android:icon=&quot;@mipmap/ic_launcher&quot;&gt;
          &lt;activity
              android:name=&quot;.MainActivity&quot;
              android:launchMode=&quot;singleTop&quot;
              android:theme=&quot;@style/LaunchTheme&quot;
              android:configChanges=&quot;orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode&quot;
              android:hardwareAccelerated=&quot;true&quot;
              android:windowSoftInputMode=&quot;adjustResize&quot;&gt;
              &lt;!-- Specifies an Android theme to apply to this Activity as soon as
                   the Android process has started. This theme is visible to the user
                   while the Flutter UI initializes. After that, this theme continues
                   to determine the Window background behind the Flutter UI. --&gt;
              &lt;meta-data
                android:name=&quot;io.flutter.embedding.android.NormalTheme&quot;
                android:resource=&quot;@style/NormalTheme&quot;
                /&gt;
              &lt;!-- Displays an Android View that continues showing the launch screen
                   Drawable until Flutter paints its first frame, then this splash
                   screen fades out. A splash screen is useful to avoid any visual
                   gap between the end of Android's launch screen and the painting of
                   Flutter's first frame. --&gt;
              &lt;meta-data
                android:name=&quot;io.flutter.embedding.android.SplashScreenDrawable&quot;
                android:resource=&quot;@drawable/launch_background&quot;
                /&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;
                  &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;activity
              android:name=&quot;com.yalantis.ucrop.UCropActivity&quot;
              android:screenOrientation=&quot;portrait&quot;
              android:theme=&quot;@style/Theme.AppCompat.Light.NoActionBar&quot;/&gt;
  
          &lt;!-- Don't delete the meta-data below.
               This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --&gt;
          &lt;meta-data
              android:name=&quot;flutterEmbedding&quot;
              android:value=&quot;2&quot; /&gt;
  
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>