londonappbrewery / bmi-calculator-flutter

Learn to Code While Building Apps - The Complete Flutter Development Bootcamp
https://www.appbrewery.co
192 stars 835 forks source link

body1 is depreciated. #9

Open levimake opened 4 years ago

levimake commented 4 years ago

The TextTheme constructors from material design 2014 seems depreciated and new constructors could be used. Check them here : https://api.flutter.dev/flutter/material/TextTheme-class.html

bodyText1 is expected instead of body1

textTheme: TextTheme(body1: TextStyle(color: Colors.white)

needs to be changed from

textTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)

Thanks. Not a big issue. Just to keep the course updated. I thank Angela for making me looking up the docs and fixing the minor bugs.

victorbjorklund commented 4 years ago

Note that body1 becomes bodyText2 and body2 becomes bodyText2. I missed that at first.

coletoncodes commented 3 years ago

Note that body1 becomes bodyText2 and body2 becomes bodyText2. I missed that at first.

Yup, I missed it too. The code should read: textTheme: TextTheme( bodyText2: TextStyle(color: Colors.white), ),