3

After migrating to my new workstation I'm getting the "undefined name '...'" error on several packages among which there is intl package with the DateFormat method. Another package giving me the same issue is strings, but I can live without it.

I tried to do everything that came to my mind:

  • flutter clean
  • flutter upgrade (--force upgrade)
  • flutter packages pub cache repair
  • removing the package from pubspec.yaml and re-adding it

but nothing seems to sort things out. Both Vs Code and Android Studio complain about the package isn't used anywhere and the DateFormat method (in the same .dart file) is an undefined name.

I'm on flutter 1.9.1+hotfix.6 stable channel and to move to new workstation I simply copied everything (projects + SDK).

What am I missing here? What could I've messed up?

Thank you in advance for any advice

  • Add out the blue, after a few hours I was away, the problem seems to have vanished. What puzzles me is that I did not do anything to solve it and unfortunately I do not believe in magic – Nik.Circles Dec 07 '19 at 18:21

1 Answers1

0

When switching machines, try always run flutter doctor. As it is an essential part of the installation process. Basically running this command will check your environment and displays a report of the status of your Flutter installation.

From a console/terminal, run the following command to see if there are any dependencies you need to install to complete the setup:

flutter doctor
MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65