Flutter升级错误

升级一个老项目,用的是flutter,升级完了一直报错:

/C:/Users/***/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/file-6.1.2/lib/src/interface/file.dart:15:16: Error: The method 'File.create' has
fewer named arguments than those of overridden method 'File.create'.
Future<File> create({bool recursive = false});

 

原因:File版本太低,在pubspec.yaml指定 file: ^6.1.4 即可

posted @ 2023-04-12 21:39  深圳大漠  阅读(323)  评论(0编辑  收藏  举报