This is a simple Flutter custom theme example with ThemeExtension for custom colors and text styles.
app_theme.dart - simple AppTheme
template with ChangeNotifier
for changing ThemeMode
and ThemeExtension
for custom colors.
app_colors_extension.dart - template for custom colors extension (GitHub Gist).
app_text_theme_extension.dart - template on how to define custom text theme extension (GitHub Gist).
app_palette.dart - example on how to define custom color palette with 2 approaches to group colors.
app_typography.dart - example on how to define custom typography.
main.dart - usage example.
Flutter version: 3.10.1