Hey, hope someone can help.
I’ve been working through the first section of Flutter Apprentice and created the Recipe App. I followed the instructions and created the app, everything worked fine except for the Theme. The colors on the iOS Simulator wouldn’t changed to the grey/black scheme. After I’d completed the whole app I did some digging around on the flutter.dev site, read the docs on ThemeData and changed the code to this…
class RecipeApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Recipe Calculator',
theme: ThemeData(
primaryColor: Colors.grey,
secondaryHeaderColor: Colors.black,
),
home: MyHomePage(title: 'Recipe Calculator'),
);
}
}
It works, the colors have updated as expected. It seems a lot simpler and less code, but I’m wondering if there is a disadvantage to using this ‘new’ code? Have I miss something?