URI 的目标不存在:"package:flutter/material.dart"



我刚刚设置了我的Windows 11用于Flutter开发,

所以我更新了flutter SDK,并将其放在我的文档中。之后,我得到了这个:

Target of URI doesn't exist: 'package:flutter/material.dart'.
The function 'runApp' isn't defined.
Classes can only extend other classes.
The name 'WidgetBuilder' isn't a type so it can't be used as a type argument.
Undefined class 'Widget'.
Undefined class 'BuildContext'.
The method 'MaterialApp' isn't defined for the type 'MyApp'.
The method 'ThemeData' isn't defined for the type 'MyApp'.
Undefined name 'Colors'.
The method doesn't override an inherited method.

什么是错误?这对我来说很难。

尝试在终端运行以下命令:

flutter pub get

相关内容

最新更新