MaterialApp widget
The Theme widget is not the only way to theme an application. The MaterialApp widget is the only other widget that also accepts a ThemeData value through its theme property. Along with theme, MaterialApp adds helper properties for localization, for example, and also navigation between screens, which we will check out in Chapter 7, Routing: Navigating Between Screens.
By adding a MaterialApp widget as the root widget of the app, you are stating your intention to follow Material Design guidelines, and that is the purpose of it, right?
Now that it knows that you will be following Material Design guidelines, the framework will be slightly different in relation to the default theme. In the following code, we do not specify a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access