Skip to Content
API ReferenceThemeProvider

ThemeProvider

Makes an Theme available to all descendants. Descendants retrieve the current theme via BuildContext). When the parent rebuilds with a different Theme instance, all dependents are automatically scheduled for a rebuild.

Constructor

ThemeProvider

Creates an ThemeProvider that supplies to the subtree rooted at .

ParameterDescription
themeThe theme to provide. Must not be null.
childThe child subtree that can access the theme. Must not be null.
keyAn optional key for reconciliation identity.

Properties

Theme

The theme made available to descendants.

Methods

UpdateShouldNotify

Last updated on