Add flag to getEnteColorScheme and getEnteTextTheme to get the opposite theme's colors and styles
This commit is contained in:
parent
a56e36a263
commit
6148243157
2 changed files with 17 additions and 4 deletions
|
@ -343,6 +343,9 @@ extension CustomColorScheme on ColorScheme {
|
|||
|
||||
EnteTheme get enteTheme =>
|
||||
brightness == Brightness.light ? lightTheme : darkTheme;
|
||||
|
||||
EnteTheme get inverseEnteTheme =>
|
||||
brightness == Brightness.light ? darkTheme : lightTheme;
|
||||
}
|
||||
|
||||
OutlinedButtonThemeData buildOutlinedButtonThemeData({
|
||||
|
|
|
@ -36,10 +36,20 @@ EnteTheme darkTheme = EnteTheme(
|
|||
shadowButton: shadowButtonDark,
|
||||
);
|
||||
|
||||
EnteColorScheme getEnteColorScheme(BuildContext context) {
|
||||
return Theme.of(context).colorScheme.enteTheme.colorScheme;
|
||||
EnteColorScheme getEnteColorScheme(
|
||||
BuildContext context, {
|
||||
bool inverse = false,
|
||||
}) {
|
||||
return inverse
|
||||
? Theme.of(context).colorScheme.inverseEnteTheme.colorScheme
|
||||
: Theme.of(context).colorScheme.enteTheme.colorScheme;
|
||||
}
|
||||
|
||||
EnteTextTheme getEnteTextTheme(BuildContext context) {
|
||||
return Theme.of(context).colorScheme.enteTheme.textTheme;
|
||||
EnteTextTheme getEnteTextTheme(
|
||||
BuildContext context, {
|
||||
bool inverse = false,
|
||||
}) {
|
||||
return inverse
|
||||
? Theme.of(context).colorScheme.inverseEnteTheme.textTheme
|
||||
: Theme.of(context).colorScheme.enteTheme.textTheme;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue