- Notifications
You must be signed in to change notification settings - Fork29.7k
Description
PROBLEM
const MyApp({Key? key}) : super(key: key);
I have noticed an error with the documentation specifically the PageView Interactive Example which leads to this error
error: This requires the 'non-nullable' language feature to be enabled. (experiment_not_enabled at [examenapp] lib/main.dart:12)
FIX (removing the ? allows my app to run)
const MyApp({Key key}) : super(key: key);
Can anyone from the flutter team verify that this is correct? If this is correct I believe the documentation should be updated to reflect this change. packages/flutter/lib/src/widgets/page_view.dart
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.2, on macOS 11.2.3 20D91 darwin-x64)
• Flutter version 2.0.2
• Framework revision8962f6d (3 weeks ago), 2021-03-11 13:22:20 -0800
• Engine revision5d8bf81
• Dart version 2.12.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• 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 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.53.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0
[✓] Connected device (2 available)
• iPhone 12 (mobile) • 7BA42098-B278-4472-9B69-43554D46C7C6 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90
• No issues found!