Created
May 6, 2020 06:43
-
-
Save jesteracer/cafda2721c72fcb7bc17c94d25f90f5e to your computer and use it in GitHub Desktop.
Examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextSpan( | |
text: block['data']['first'], | |
style: TextStyle( | |
color: Provider.of<ThemeProvider>(context) | |
.current | |
.bodyFontColor, | |
fontFamily: 'Proxima Nova', | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment