Component theme normalization updates
Summary
#BottomAppBarTheme
was refactored to conform to Flutter's conventions for component themes. BottomAppBarThemeData
was added to define overrides for the defaults of the component visual properties. Releases of Flutter continue to normalize component themes like these for a more consistent theming experience in the material library.
Migration guide
#In ThemeData
:
- The type of
bottomAppBarTheme
property has been changed fromBottomAppBarTheme
toBottomAppBarThemeData
.
The return type of the component theme xTheme.of()
methods and Theme.of().xTheme
have also changed to xThemeData
.
Code before migration:
final BottomAppBarTheme bottomAppBarTheme = Theme.of(context).bottomAppBarTheme;
final BottomAppBarTheme bottomAppBarTheme = BottomAppBarTheme.of(context);
final ThemeData theme = ThemeData(
bottomAppBarTheme: BottomAppBarTheme(),
);
final ThemeData theme = ThemeData().copyWith(
bottomAppBarTheme: BottomAppBarTheme(),
);
Code after migration:
final BottomAppBarThemeData bottomAppBarTheme = Theme.of(context).bottomAppBarTheme;
final BottomAppBarThemeData bottomAppBarTheme = BottomAppBarTheme.of(context);
final ThemeData theme = ThemeData(
bottomAppBarTheme: BottomAppBarThemeData(),
);
final ThemeData theme = ThemeData().copyWith(
bottomAppBarTheme: BottomAppBarThemeData(),
);
Timeline
#Landed in version: Not yet
Stable release: Not yet
References
#API documentation:
Relevant PRs:
Unless stated otherwise, the documentation on this site reflects the latest stable version of Flutter. Page last updated on 2025-06-11. View source or report an issue.