Target of URI doesn't exist 'package:flutter/material.dart' Target of URI doesn't exist 'package:flutter/material.dart' dart dart

Target of URI doesn't exist 'package:flutter/material.dart'


  1. ctrl -> Shift -> A (Find Action)
  2. Search for "Dart Analysis"
  3. Click the icon that says "Restart the Dart Analysis server"
  4. The red underline disappears from the package import and everything works.


I tried this solution and it worked just perfect:

open terminal from the project directoryand run

flutter packages get


Flutter Issue Fix: 18-April-2020

It happened due to :

  1. You have created a project and then you try to push the code to Git ( and keeping your vscode open)
  2. Your package needs to update using command flutter packages get ( simply from vscode menu choose terminal and then run this command )
  3. If you still it didn't fix your issue, simply go to File Menu, choose Close Folder, it fixes your issue.
  4. Last option restart VSCode.

Keep Coding #Flutter