flutter 报错提示 this requires the control-flow-collections experiment to be enabled

 

解决:在根目录添加  analysis_options.yaml 配置文件:

analyzer:
  enable-experiment:
    - control-flow-collections

版本要:

environment:
  sdk: ">=2.6.0 <3.0.0"

然后 ,flutter clean,flutter pub get

 

还是报错,就 重启一下。

你可能感兴趣的:(flutter,bug)