Skip to content

Instantly share code, notes, and snippets.

@jesteracer
Created May 13, 2020 14:07
Show Gist options
  • Save jesteracer/68bd24da5376a04ed56b5791e96b9a82 to your computer and use it in GitHub Desktop.
Save jesteracer/68bd24da5376a04ed56b5791e96b9a82 to your computer and use it in GitHub Desktop.
provider.dart
class ThemeProvider extends ChangeNotifier {
CustomThemeData current;
CustomThemeData blackTheme = CustomThemeData(
name: 'black',
bodyFontColor: Color.fromRGBO(184, 184, 184, 1),
...
);
CustomThemeData lightTheme = CustomThemeData(
name: 'black',
bodyFontColor: Color.fromRGBO(184, 184, 184, 1),
...
);
ThemeProvider(withTheme, withFontMultiplier, withAutoTheme) {
theme = withTheme;
autoTheme = withAutoTheme;
current = withTheme == 'light' ? lightTheme : blackTheme;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment