skip to Main Content

I am brand new to Flutter and I am working on my first ever project which I aptly named "my_first_flutter_app". I’m followng along with the tuturial on the flutter codelab
and after replacing the contents of pubspec.yaml and analysis_options.yaml I get the errors listen here in my test file: enter image description here

how do I solve these and more importantly how do I prevent them on future projects

I tried flutter clean Flutter packages get and Flutter packages upgrade, none of which got rid of any of the errors

2

Answers


  1. First try:

    flutter clean
    flutter pub get 
    flutter pub upgrade
    

    If none of the above works then reload VS code.
    Ctrl+Shift+P-Windows OR Cmd+Shift+P-Mac
    Developer: Reload Window

    Login or Signup to reply.
  2. Erase everything from that widget_test.dart file, paste the below-mentioned code into your widget_test.dart file & it will resolve your issue.

    void main() {}
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search