Dart The named parameter 'home' isn't defined

2,705

As mentioned in the comments, it seems like you may have modified your Flutter SDK (there was previously a bug in the analysis server that made this easy to do accidentally by running quick-fixes).

There's an open issue about having flutter doctor detect this here:

https://github.com/flutter/flutter/issues/25220

For now, running the git clean command Günter gave in the comments from inside your Flutter SDK folder should get things back to normal.

Share:
2,705
Admin
Author by

Admin

Updated on December 07, 2022

Comments

  • Admin
    Admin over 1 year

    when I am trying to run an app in VS code, this message shows up "The named parameter 'home' isn't defined.".

    It is a general problem for all flutter projects .flutter doctor says no issues.

    I also tried creating a new project from scratch using android studio and Intellij and no progress .it says (theme: and home:) are not identified as named parameters.before that everything was perfectly fine ..please help! :(

    • diegoveloper
      diegoveloper over 5 years
      maybe you modified the source code of: MaterialApp
    • Admin
      Admin over 5 years
      If true can i restore it back?
    • lena
      lena over 5 years
      Do you have several versions of Flutter installed or something?
    • Günter Zöchbauer
      Günter Zöchbauer over 5 years
      git clean -xfd in the Flutter install directory might restore your Flutter installation.
    • Ammar Hussein
      Ammar Hussein over 3 years
      @GünterZöchbauer running this command made all required annotations errors
    • Günter Zöchbauer
      Günter Zöchbauer over 3 years
      Run flutter doctor that should fix it