Skip to content

dart 2.9 打开空安全后全错了,有计划兼容嘛? #30

Description

@TshineZheng

刚升了 Flutter 1.20,并尝试迁移代码到 non-nullable,突然发现用这个工具生成的 json 代码全部都报错了。

Activity

  1. debuggerx01 commented on Aug 14, 2020

    @debuggerx01
    Owner

    我更新了以后没碰到你说的错误 能详细说下什么情况吗

  2. TshineZheng commented on Aug 15, 2020

    @TshineZheng
    Author

    @debuggerx01 空安全打开了吗?
    升到最新的话 dart 应该是 2.9。
    analysis_options.yaml 文件中加入

    analyzer:
      enable-experiment:
        - non-nullable

    调整pubspec.yaml中的sdk版本为

    environment:
      sdk: ">=2.9.0 <3.0.0"
  3. debuggerx01 commented on Mar 5, 2021

    @debuggerx01
    Owner

    @TshineZheng null-safety 分支更新了 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions