George
George

Reputation: 357

Flutter/Dart double isn't a type after pub get

If I clean my Flutter project (Android Studio), double is fine. I must do a pub get to get all the classes I am using. After the pub get double is not a type anymore. A few doubles are all right but most are an undefined error.

The implication is that one of the libraries in the pub get is messing up the basic double type.

I hope to get some recommendations on how to figure out this problem.

Where are the libraries that pub get retrieves? Are they simply files I can rename to avoid the pub get to figure out the offender?

Thanks for any help.

Upvotes: 0

Views: 906

Answers (1)

George
George

Reputation: 357

To fix some previous issue I added a line that altered double behavior a long time ago. Updating Flutter and Dart did not like the line and considered double invalid. Removing the line fixed the problem. I found the line by looking at all the errors, and fortunately, the line was included in the error list.

Of course, I now wish I could recall what issue the line was handling. Sometimes a good comment is a nice idea.

Upvotes: 0

Related Questions