JSONFormat4Flutter icon indicating copy to clipboard operation
JSONFormat4Flutter copied to clipboard

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

Open TshineZheng opened this issue 5 years ago • 3 comments
trafficstars

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

TshineZheng avatar Aug 14 '20 08:08 TshineZheng

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

debuggerx01 avatar Aug 14 '20 15:08 debuggerx01

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

analyzer:
  enable-experiment:
    - non-nullable

调整pubspec.yaml中的sdk版本为

environment:
  sdk: ">=2.9.0 <3.0.0"

TshineZheng avatar Aug 15 '20 01:08 TshineZheng

@TshineZheng null-safety 分支更新了 :smile:

debuggerx01 avatar Mar 05 '21 17:03 debuggerx01