I would like to use flutter-web plugin in my app. However, I am getting the following SDK error when I add it to my YAML file. I just upgraded to 1.20.4
How do I fix this error?
The current Flutter SDK version is 1.20.4.
Because app depends on webview_flutter >=1.0.0 which requires Flutter SDK version >=1.22.0 <2.0.0, version solving failed. pub get failed (1; Because app depends on webview_flutter >=1.0.0 which requires Flutter SDK version >=1.22.0 <2.0.0, version solving failed.)
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 12.0) [✓] Android Studio (version 3.6) [✓] VS Code (version 1.49.2) [✓] Connected device (1 available)
• No issues found!
This is the info in my pubspec.yaml file
environment: sdk: ">=2.2.2 <3.0.0"
webview_flutter package need minSdkVersion 19 so you have to change the app level gradle
after upgrade your flutter using
flutter upgrade
and then import webview_flutter In your pubspec.yaml file
webview_flutter: ^1.0.0
because webview_flutter is stable in flutter 1.22 stable release.