Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: PageView Interactive Example leads to non-nullable error #79395

Closed
Labels
a: null-safetySupport for Dart's null safety featurea: qualityA truly polished experienced: api docsIssues with https://api.flutter.dev/d: examplesSample code and demosf: material designflutter/packages/flutter/material repository.found in release: 2.0Found to occur in 2.0frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
@imcrisanto

Description

@imcrisanto

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: null-safetySupport for Dart's null safety featurea: qualityA truly polished experienced: api docsIssues with https://api.flutter.dev/d: examplesSample code and demosf: material designflutter/packages/flutter/material repository.found in release: 2.0Found to occur in 2.0frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp