Visual Studio Code - URI Target Does Not Exist 'package: flutter / material.dart'

I just installed my Macbook for flutter development,

So I downloaded the flutter SDK and put it in my documents . After that, I configure the path variable to work with flutter on my command line.

I execute a command flutter create todolistto achieve an empty project.

I also tweaked my Visual Studio code with Dart-Code so that I had the correct syntax highlighting, intellisense, etc.

Therefore, when I open the Visual Studio code, it highlights the method import, as shown in the following figure:

first line of the code

, , , .

flutter packages get pub get flutter packages get . .

, ?

+49
14

Visual Studio , flutter packages get .

+72

flutter packages get

VISUAL CODE STUDIO.

.

+23

Dart Code ! , - , Code. , , Flutter - SDK, , Flutter (, ).

"todo".

, , , Dart Code Flutter..

Dart, Flutter .

+13

flutter ( - , )

Android Studio Visual Studio

+9

flutter packages get

,

+5

Dart-Code Flutter , FLUTTER_ROOT Flutter.

+4

flutter packages get , VS Developer: Reload Window. Ctrl+Shift+P (Cmd+Shift+P Mac). . VS Code.

+4

(ctrl + shift + p), flutter: get packages ( ); , reload window . .

+3

.

+1

: http: ^ 0.12.0 pubspec.yaml, , http

+1

: " flutter" , , ".packages". - , .

+1

,

0

:

  • flutter upgrade

  • flutter pub get

  • flutter packages get

0

  ! Flutter .packages, . 'flutter'.
Flutter: /opt/flutter : /Users/Shared/Library/flutter , Flutter, , . , , ( " --version", , ).

flutter packages get , - SDK.

0

Source: https://habr.com/ru/post/1680729/


All Articles