2

提示:

(抱歉有错误。英语不是我的母语)

(我是新来的)

我的颤振项目中有很多错误。我认为这是因为包裹。当我写: 时import 'package:flutter/material.dart';,android studio 在它下面画了一条红线,表示错误,当我在导入包上按住鼠标指针时,它说:Target of URI doesn't exist: 'package:flutter/material.dart'我认为这就是所有错误的原因。我该如何解决?

我的错误:

error: Target of URI doesn't exist: 'package:flutter/material.dart'. (uri_does_not_exist at [untitled6] bin\main.dart:1)

error: The function 'runApp' isn't defined. (undefined_function at [untitled6] bin\main.dart:3)

error: Classes can only extend other classes. (extends_non_class at [untitled6] bin\main.dart:5)

error: Undefined class 'Widget'. (undefined_class at [untitled6] bin\main.dart:8)

error: Undefined class 'BuildContext'. (undefined_class at [untitled6] bin\main.dart:8)

error: The method 'MaterialApp' isn't defined for the type 'MyApp'. (undefined_method at [untitled6] bin\main.dart:9)

error: Classes can only extend other classes. (extends_non_class at [untitled6] bin\main.dart:16)

error: Undefined class 'Widget'. (undefined_class at [untitled6] bin\main.dart:19)

error: Undefined class 'BuildContext'. (undefined_class at [untitled6] bin\main.dart:19)

error: The method 'Material' isn't defined for the type 'MyScaffold'. (undefined_method at [untitled6] bin\main.dart:20)

error: The method 'Column' isn't defined for the type 'MyScaffold'. (undefined_method at [untitled6] bin\main.dart:21)

error: The name 'Widget' isn't a type so it can't be used as a type argument. (non_type_as_type_argument at [untitled6] bin\main.dart:22)

error: The name 'Row' isn't a class. (creation_with_non_type at [untitled6]     bin\main.dart:23)

error: The name 'IconButton' isn't a class. (creation_with_non_type at [untitled6] bin\main.dart:24)

error: The method 'Icon' isn't defined for the type 'MyScaffold'. (undefined_method at [untitled6] bin\main.dart:25)

error: Undefined name 'Icons'. (undefined_identifier at [untitled6] bin\main.dart:25)

error: The name 'Text' isn't a class. (creation_with_non_type at [untitled6] bin\main.dart:29)

error: The name 'IconButton' isn't a class. (creation_with_non_type at [untitled6] bin\main.dart:30)

error: The method 'Icon' isn't defined for the type 'MyScaffold'. (undefined_method at [untitled6] bin\main.dart:32)

error: Undefined name 'Icons'. (undefined_identifier at [untitled6] bin\main.dart:32)

error: Expected to find ')'. (expected_token at [untitled6] bin\main.dart:37)

error: Expected to find ']'. (expected_token at [untitled6] bin\main.dart:38)

error: Expected to find ')'. (expected_token at [untitled6] bin\main.dart:38)

error: Expected to find ')'. (expected_token at [untitled6] bin\main.dart:39)

info: The method doesn't override an inherited method. (override_on_non_overriding_member at [untitled6] bin\main.dart:8)

info: Unnecessary new keyword. (unnecessary_new at [untitled6] bin\main.dart:11)

info: The method doesn't override an inherited method. (override_on_non_overriding_member at [untitled6] bin\main.dart:19)

info: Unnecessary new keyword. (unnecessary_new at [untitled6] bin\main.dart:23)

info: Unnecessary new keyword. (unnecessary_new at [untitled6] bin\main.dart:24)

info: Unnecessary new keyword. (unnecessary_new at [untitled6] bin\main.dart:29)

info: Unnecessary new keyword. (unnecessary_new at [untitled6] bin\main.dart:30)

请你帮助我好吗?我的工作延迟了几天

4

0 回答 0