September 2019
Beginner
512 pages
12h 52m
English
In Flutter, everything is a widget, and we can construct the user interface by adding widgets using the child and children properties of each widget. The Theme widget behaves like any other; it defines properties and can have a child.
The Theme widget also works with the InheritedWidget technique, so every descending widget can access it by using Theme.of(context), which internally makes a call to the helper inheritFromWidgetOfExactType method from the BuildContext class. That's how Material Design widgets use the Theme widget to style themselves:

So, the theme data is applied to descending widgets but can be overridden in local ...
Read now
Unlock full access