iamshaunjp / flutter-firebase

All course files for the Flutter & Firebase tutorial playlist on The Net Ninja YouTube channel
580 stars 441 forks source link

The method 'toDouble' isn't defined for the type 'Object' #18

Open karan316 opened 4 years ago

karan316 commented 4 years ago

value: (_currentStrength ?? userData.strength).toDouble()

This code is giving an error because of userData.strength.

awais-git commented 3 years ago

go to user widget, in which go to userData class and replace final String strength with final int strength

AbdulQader496 commented 3 years ago

go to user widget, in which go to userData class and replace final String strength with final int strength

thanks for pointing it out... wasted 2 hour of my life and found out that i did not declare the variable as int...