Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Resources: Theme, Styles, Colors

Dimitar Zabaznoski edited this page Jun 15, 2021 · 2 revisions

Colors

Path: resources/colors

Define your app's color palette here.

Example:

Color palette example

Styles

Path: resources/styles

Keep your reusable app styles here. See text_styles.dart for some example TextStyles.

Theme

Path: resources/theme

Toggle between light and dark theme.

app_theme.dart contains theme configurations:

  • themeLight() will provide ThemeData object light theme with customized colors used from ColorPalette
  • themeDark() will use the default dark ThemeData object - ThemeData.dark()
  • the setCommonThemeElements method contains common theme configuration to all themes

To change the theme at runtime use the ThemeChangeNotifier methods:

  • toggle theme
  • set dark theme
  • set light theme
  • get theme mode
Clone this wiki locally