预计会找到 ')'.dart(expected_token)如图所示
dart flutter flutter-dependencies flutter-layout flutter-animation
我试图运行我的 flutter 应用程序,效果很好。但是,更新后,它会抛出以下错误。
\n我更新了 Build.gradle 文件(应用程序级别),添加了编译 sdk 版本(31)。\n我还更新了依赖项。但是,似乎没有一个有帮助。
\nLaunching lib/main.dart on Android SDK built for arm64 in debug mode...\nlib/main.dart:1\n: Error: The method \'File.create\' has fewer named arguments than those of overridden method \'File.create\'.\n../\xe2\x80\xa6/interface/file.dart:15\n Future<File> create({bool recursive = false});\n ^\norg-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method (\'create\').\n Future<File> create({bool recursive = false, bool exclusive = false});\n ^\n: Error: The method \'File.create\' doesn\'t have the named parameter \'exclusive\' of overridden method \'File.create\'.\n../\xe2\x80\xa6/interface/file.dart:15\n Future<File> create({bool recursive = false});\n ^\norg-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: …Run Code Online (Sandbox Code Playgroud) 编译器消息:错误:无法解析“package:http/http.dart”中的包“http”。
Container(约束:BoxConstraints(maxHeight:300,),装饰:BoxDecoration(borderRadius:BorderRadius.all(Radius.circular(20)),),子:WebView(initialUrl:'https: //flutter.io ',)) ,
cornerradius dart flutter flutter-dependencies flutter-layout
错误:
\n\xd0\x9f\xd1\x80\xd0\xbe\xd0\xb8\xd0\xb7\xd0\xbe\xd1\x88\xd0\xbb\xd0\xbe \xd0\xb8\xd1\x81\xd0\xba\xd0\xbb\xd1\x8e\xd1\x87\xd0\xb5\xd0\xbd\xd0\xb8\xd0\xb5.\nJsonUnsupportedObjectError (Converting object to an encodable object failed: Closure: () => Map<dynamic, dynamic>)\nRun Code Online (Sandbox Code Playgroud)\n代码:
\nMap toJson() => {\n "UnigTime": {\n "hour": _timerHourCurrentSliderValue,\n "minute": _timerMinuteCurrentSliderValue.toInt()\n }\n };\n final jsonAllTime = jsonEncode(toJson);\n Server().async(jsonAllTime);\nRun Code Online (Sandbox Code Playgroud)\n