Extending the parent theme

Rather than overriding everything, it often makes sense to extend the parent
theme. You can handle this by using the copyWith() method.

Using a Theme

Now that you’ve defined a theme, use it within the widgets’ build()
methods by using the Theme.of(context) method.

The Theme.of(context) method looks up the widget tree and returns
the nearest Theme in the tree. If you have a standalone
Theme defined above your widget, that’s returned.
If not, the app’s theme is returned.

In fact, the FloatingActionButton uses this technique to find the
accentColor.

Interactive example

Use a custom font

Work with tabs