Expected Result:
Navigate to Previous page
Actual Result
Closing whole application
To Reproduce :
Wrap that page's Scaffold in a WillPopScope widget
return new WillPopScope(
onWillPop: () async {
return true;
},
child: new Scaffold(
…
),
);
GetX Version
get: ^5.0.0-beta.52
[✓] Flutter (Channel stable, 3.3.0, on Ubuntu 21.04 5.11.0-49-generic, locale en_IN)
• Flutter version 3.3.0 on channel stable at /home/pradeep/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ffccd96b62 (8 days ago), 2022-08-29 17:28:57 -0700
• Engine revision 5e9e0e0aa8
• Dart version 2.18.0
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
• Android SDK at /home/pradeep/Android/Sdk
• Platform android-33, build-tools 33.0.0-rc1
• Java binary at: /snap/android-studio/123/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
• cmake version 3.10.2
• ninja version 1.8.2
• pkg-config version 0.29.1
[✓] Android Studio (version 2021.2)
• Android Studio at /snap/android-studio/123/android-studio
• Flutter plugin version 70.0.2
• Dart plugin version 212.5744
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Related
After I updated flutter to the new version (3.0.1), I needed to install gradle (7.4) more than once in the same week, because whenever I run Flutter App it gets stuck at Running Gradle task 'assembleDebug'.
The app was working and running normally previously
/home/alissar/Downloads/flutter_linux_2.5.3-stable/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, 3.0.1, on Ubuntu 21.04 5.11.0-49-generic, locale en_US.UTF-8)
• Flutter version 3.0.1 at /home/alissar/Downloads/flutter_linux_2.5.3-stable/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fb57da5f94 (4 weeks ago), 2022-05-19 15:50:29 -0700
• Engine revision caaafc5604
• Dart version 2.17.1
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /home/alissar/Android/Sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = /home/alissar/Android/Sdk
• Java binary at: /home/alissar/Downloads/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Ubuntu clang version 12.0.0-3ubuntu1~21.04.2
• cmake version 3.18.4
• ninja version 1.10.1
• pkg-config version 0.29.2
[✓] Android Studio (version 2020.3)
• Android Studio at /home/alissar/Downloads/android-studio
• Flutter plugin version 61.0.2
• Dart plugin version 203.8430
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] VS Code (version 1.67.2)
• VS Code at /usr/share/code
• Flutter extension version 3.36.0
[✓] Connected device (3 available)
• sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Linux (desktop) • linux • linux-x64 • Ubuntu 21.04 5.11.0-49-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.61
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Process finished with exit code 0
whenever I try to press space bar inside a TextField of a Flutter Web Release it doesn't do anything. This occurs on ANY browser except for chrome.
I already tried this "fix":
return MaterialApp(
shortcuts: {
LogicalKeySet(LogicalKeyboardKey.space): ActivateIntent(),
},
And also I upgraded to flutter 2.10, which was a fix to some people. Sadly not for me, so I'm really happy about help.
The issues sometimes goes away if the Site is reloaded several times.
[✓] Flutter (Channel stable, 2.10.2, on macOS 11.1 20C69 darwin-arm, locale
en-DE)
• Flutter version 2.10.2
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 097d3313d8 (5 days ago), 2022-02-18 19:33:08 -0600
• Engine revision a83ed0e5e3
• Dart version 2.16.1
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 12.5.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• 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 11.0.10+0-b96-7281165)
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 98.0.4758.102
[✓] HTTP Host Availability
• All required HTTP hosts are available
$ flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on Linux, locale en_US.UTF-8)
• Flutter version 2.2.3 at /home/jrhp/snap/flutter/common/flutter
• Framework revision f4abaa0735 (3 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /home/jrhp/Android/Sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /snap/android-studio/113/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Android Studio (version 4.2)
• Android Studio at /snap/android-studio/113/android-studio
• Flutter plugin version 58.0.1
• Dart plugin version 202.8531
• Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
[✓] VS Code (version 1.58.0)
• VS Code at /usr/share/code
• Flutter extension version 3.24.0
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114
• No issues found!
I am having issues running my flutter application. I am using objectbox-dart for storing data in my app. So far so good, but when I create a store using path_provider, the getApplicationSupportDirectory() throws _CastError: Null check operator on a null value. Below is the output of flutter doctor -v
[✓] Flutter (Channel stable, 2.2.1, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-PK)
• Flutter version 2.2.1 at /Users/muhammadumar/sdks/flutter
• Framework revision 02c026b03c (11 days ago), 2021-05-27 12:24:44 -0700
• Engine revision 0fdb562ac8
• Dart version 2.13.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/muhammadumar/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
• 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.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.2)
• 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 11.0.8+10-b944.6916264)
[✓] VS Code (version 1.56.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.23.0
[✓] Connected device (2 available)
• MI 8 Lite (mobile) • bb4e8ab • android-arm64 • Android 10 (API 29)
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.77
• No issues found!
Below is the exact line of code of path_provider file where exception is being caught
Future<Directory> getApplicationSupportDirectory() async {
final String? path = await _platform.getApplicationSupportPath();
if (path == null) {
throw MissingPlatformDirectoryException(
'Unable to get application support directory');
}
return Directory(path);
}
I am unable to run my app. Any help would be appreciated.
Thanks
shared_preferences: ^0.5.12+4
Error log:
MissingException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
flutter sdk details:
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.14.6 18G7016 darwin-x64, locale en-US)
• Flutter version 1.22.5 at /Users/taleb/Developer/flutter
• Framework revision 7891006299 (6 weeks ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/taleb/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Users/taleb/Library/Android/sdk
• 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 installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
• CocoaPods version 1.8.3
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin installed
• Dart plugin version 201.9317
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 45.1.2
• Dart plugin version 193.7547
[✓] Connected device (1 available)
• SM A107F (mobile) • R9AM905ZREJ • android-arm • Android 10 (API 29)
! Doctor found issues in 1 category.
If you're using shared_preferences 0.2.4 and above, use setMockInitialValues:
SharedPreferences.setMockInitialValues({}); // set initial values here if desired
For earlier versions you can do it manually:
const MethodChannel('plugins.flutter.io/shared_preferences')
.setMockMethodCallHandler((MethodCall methodCall) async {
if (methodCall.method == 'getAll') {
return <String, dynamic>{}; // set initial values here if desired
}
return null;
});