Skip to content

flutter create --sample has null-safety warnings #74564

Closed

Description

@ronriley

Page at https://api.flutter.dev/flutter/material/Radio-class.html

example gives errors:

"This requires the 'non-nullable' language feature to be enabled"

Activity

  1. pedromassangocode commented on Jan 25, 2021

    @pedromassangocode

    Reproducible on stable channel. In short, code sample from stable channel should work fine while running with stable channel of Flutter.

    flutter doctor -v
      ╔════════════════════════════════════════════════════════════════════════════╗
      ║                 Welcome to Flutter! - https://flutter.dev                  ║
      ║                                                                            ║
      ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
      ║ statistics and basic crash reports. This data is used to help improve      ║
      ║ Flutter tools over time.                                                   ║
      ║                                                                            ║
      ║ Flutter tool analytics are not sent on the very first run. To disable      ║
      ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
      ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
      ║ event will be sent, and then no further information will be sent by the    ║
      ║ Flutter tool.                                                              ║
      ║                                                                            ║
      ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
      ║ Note: The Google Privacy Policy describes how data is handled in this      ║
      ║ service.                                                                   ║
      ║                                                                            ║
      ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
      ║ crash reports to Google.                                                   ║
      ║                                                                            ║
      ║ Read about data we send with crash reports:                                ║
      ║ https://flutter.dev/docs/reference/crash-reporting                         ║
      ║                                                                            ║
      ║ See Google's privacy policy:                                               ║
      ║ https://policies.google.com/privacy                                        ║
      ╚════════════════════════════════════════════════════════════════════════════╝
    
    [✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H114 darwin-x64, locale en)
        • Flutter version 1.22.5 at /Users/pedromassango/Code/flutter_stable
        • Framework revision 7891006299 (7 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.2)
        • Android SDK at /Users/pedromassango/Library/Android/sdk
        • Platform android-30, build-tools 30.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 12.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.1, Build version 12A7403
        • CocoaPods version 1.9.3
    
    [!] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    
    [✓] IntelliJ IDEA Community Edition (version 2020.3.1)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin installed
        • Dart plugin version 203.6912
    
    [✓] VS Code (version 1.52.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.18.1
    
    [!] Connected device
        ! No devices available
    
    ! Doctor found issues in 2 categories.
  2. added
    a: first hourThe first hour of using Flutter
    a: null-safetySupport for Dart's null safety feature
    d: api docsIssues with https://api.flutter.dev/
    p: material_uimaterial_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    on Jan 25, 2021
  3. nslogx commented on Jan 27, 2021

    @nslogx

    @pedromassangocode same error with stable channel of Flutter

    image

    flutter doctor -v
    [✓] Flutter (Channel stable, 1.22.6, on macOS 11.0.1 20B29 darwin-x64, locale
        zh-Hans-CN)
        • Flutter version 1.22.6 at /Users/ry/flutter
        • Framework revision 9b2d32b605 (4 days ago), 2021-01-22 14:36:39 -0800
        • Engine revision 2f0af37152
        • Dart version 2.10.5
        • Pub download mirror https://pub.flutter-io.cn
        • Flutter download mirror https://storage.flutter-io.cn
    
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
        • Android SDK at /Users/ry/Library/Android/sdk
        • Platform android-30, build-tools 30.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-6222593)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 12.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.3, Build version 12C33
        • CocoaPods version 1.10.1
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 48.1.2
        • Dart plugin version 193.7547
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [✓] VS Code (version 1.52.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.18.1
    
    [✓] Connected device (2 available)
        • iPhone X (mobile)      • 070bd921abefe0b87f5ffababdb68925d4092a8b • ios • iOS 14.3
        • iPhone 12 Pro Max (mobile) • A5FB951C-610E-47C6-84B3-8914564597D6     • ios •
          com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    
    • No issues found!
  4. self-assigned this
    on Jan 27, 2021
  5. changed the title [-]Radio button API documentation example requires 'non-nullable' language feature to be enabled[/-] [+]`flutter create --sample` has null-safety warnings[/+] on Jan 27, 2021
  6. goderbauer commented on Jan 27, 2021

    @goderbauer
    Member

    @pcsosinski If #74844 doesn't make the cut for 1.26 I propose cherry-picking it as it is breaking the flutter create --sample workflow, which is prominently linked from the code samples in our API docs.

    /cc @gspencergoog @jonahwilliams

  7. github-actions commented on Aug 6, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: first hourThe first hour of using Fluttera: null-safetySupport for Dart's null safety featured: api docsIssues with https://api.flutter.dev/found in release: 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packages

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions