WIP Themes: Dark theme fonts
This commit is contained in:
		| @@ -249,7 +249,7 @@ class _AlarmControlPanelControlsWidgetWidgetState extends State<AlarmControlPane | |||||||
|           child: Text( |           child: Text( | ||||||
|             "TRIGGER", |             "TRIGGER", | ||||||
|             style: Theme.of(context).textTheme.subhead.copyWith( |             style: Theme.of(context).textTheme.subhead.copyWith( | ||||||
|               color: Colors.redAccent |               color: Theme.of(context).errorColor | ||||||
|             ) |             ) | ||||||
|           ), |           ), | ||||||
|           onPressed: () => _askToTrigger(entity), |           onPressed: () => _askToTrigger(entity), | ||||||
|   | |||||||
| @@ -2,7 +2,23 @@ import 'package:flutter/material.dart'; | |||||||
|  |  | ||||||
| class HAClientTheme { | class HAClientTheme { | ||||||
|  |  | ||||||
|   static const Color defaultFontColor = Colors.black87; |   static const TextTheme textTheme = TextTheme( | ||||||
|  |     display1: TextStyle(fontSize: 34, fontWeight: FontWeight.normal), | ||||||
|  |     display2: TextStyle(fontSize: 34, fontWeight: FontWeight.normal), | ||||||
|  |     headline: TextStyle(fontSize: 24, fontWeight: FontWeight.normal), | ||||||
|  |     title: TextStyle(fontSize: 20, fontWeight: FontWeight.w700), | ||||||
|  |     subhead: TextStyle(fontSize: 16, fontWeight: FontWeight.normal), | ||||||
|  |     body1: TextStyle(fontSize: 15, fontWeight: FontWeight.normal), | ||||||
|  |     body2: TextStyle(fontSize: 15, fontWeight: FontWeight.w500), | ||||||
|  |     subtitle: TextStyle(fontSize: 15, fontWeight: FontWeight.w500), | ||||||
|  |     caption: TextStyle(fontSize: 12, fontWeight: FontWeight.normal), | ||||||
|  |     overline: TextStyle( | ||||||
|  |       fontSize: 10, | ||||||
|  |       fontWeight: FontWeight.normal, | ||||||
|  |       letterSpacing: 1, | ||||||
|  |     ), | ||||||
|  |     button: TextStyle(fontSize: 14, fontWeight: FontWeight.w500), | ||||||
|  |   ); | ||||||
|  |  | ||||||
|   static final HAClientTheme _instance = HAClientTheme |   static final HAClientTheme _instance = HAClientTheme | ||||||
|       ._internal(); |       ._internal(); | ||||||
| @@ -16,25 +32,34 @@ class HAClientTheme { | |||||||
|   final ThemeData lightTheme = ThemeData.light().copyWith( |   final ThemeData lightTheme = ThemeData.light().copyWith( | ||||||
|     //primaryColor: Colors.blue, |     //primaryColor: Colors.blue, | ||||||
|     textTheme: ThemeData.light().textTheme.copyWith( |     textTheme: ThemeData.light().textTheme.copyWith( | ||||||
|       display1: TextStyle(fontSize: 34, fontWeight: FontWeight.normal, color: Colors.black54), |       display1: textTheme.display1.copyWith(color: Colors.black54), | ||||||
|       display2: TextStyle(fontSize: 34, fontWeight: FontWeight.normal, color: Colors.redAccent), |       display2: textTheme.display2.copyWith(color: Colors.redAccent), | ||||||
|       headline: TextStyle(fontSize: 24, fontWeight: FontWeight.normal, color: defaultFontColor), |       headline: textTheme.headline.copyWith(color: Colors.black87), | ||||||
|       title: TextStyle(fontSize: 20, fontWeight: FontWeight.w700, color: defaultFontColor), |       title: textTheme.title.copyWith(color: Colors.black87), | ||||||
|       subhead: TextStyle(fontSize: 16, fontWeight: FontWeight.normal, color: Colors.black54), |       subhead: textTheme.subhead.copyWith(color: Colors.black54), | ||||||
|       body1: TextStyle(fontSize: 15, fontWeight: FontWeight.normal, color: defaultFontColor), |       body1: textTheme.body1.copyWith(color: Colors.black87), | ||||||
|       body2: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: defaultFontColor), |       body2: textTheme.body2.copyWith(color: Colors.black87), | ||||||
|       subtitle: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: Colors.black45), |       subtitle: textTheme.subtitle.copyWith(color: Colors.black45), | ||||||
|       caption: TextStyle(fontSize: 12, fontWeight: FontWeight.normal, color: Colors.black45), |       caption: textTheme.caption.copyWith(color: Colors.black45), | ||||||
|       overline: TextStyle( |       overline: textTheme.overline.copyWith(color: Colors.black26), | ||||||
|         fontSize: 10, |       button: textTheme.button.copyWith(color: Colors.white), | ||||||
|         fontWeight: FontWeight.normal, |  | ||||||
|         color: Colors.black26, |  | ||||||
|         letterSpacing: 1, |  | ||||||
|       ), |  | ||||||
|       button: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.white), |  | ||||||
|     ) |     ) | ||||||
|   ); |   ); | ||||||
|  |  | ||||||
|   final ThemeData darkTheme = ThemeData.dark(); |   final ThemeData darkTheme = ThemeData.dark().copyWith( | ||||||
|  |     textTheme: ThemeData.light().textTheme.copyWith( | ||||||
|  |       display1: textTheme.display1.copyWith(color: Colors.white70), | ||||||
|  |       display2: textTheme.display2.copyWith(color: Colors.redAccent), | ||||||
|  |       headline: textTheme.headline.copyWith(color: Colors.white), | ||||||
|  |       title: textTheme.title.copyWith(color: Colors.white), | ||||||
|  |       subhead: textTheme.subhead.copyWith(color: Colors.white70), | ||||||
|  |       body1: textTheme.body1.copyWith(color: Colors.white), | ||||||
|  |       body2: textTheme.body2.copyWith(color: Colors.white), | ||||||
|  |       subtitle: textTheme.subtitle.copyWith(color: Colors.white70), | ||||||
|  |       caption: textTheme.caption.copyWith(color: Colors.white70), | ||||||
|  |       overline: textTheme.overline.copyWith(color: Colors.white54), | ||||||
|  |       button: textTheme.button.copyWith(color: Colors.white), | ||||||
|  |     ) | ||||||
|  |   ); | ||||||
|  |  | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user