Theme widgets
Developing an application goes beyond good features. It is also about the user experience that the app offers.
The composability of Flutter widgets helps in this part of development. By defining single responsibility for each widget type, we can choose to define themes and styles that apply to a single widget, to all widgets in a subtree, or to the entire application.
By using the Theme widget, we can customize the whole look and feel of an application with custom colors for text, error messages, highlights, and also custom fonts. Flutter also uses this widget in its own widgets. MaterialApp is a great example of how the framework internal widgets are composed: it uses the Theme widget internally to customize the look of the ...
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