diff options
author | 2021-12-01 14:00:36 +0900 | |
---|---|---|
committer | 2021-12-01 14:00:36 +0900 | |
commit | df0734e99ee09feaf7da1abec2be57997e2f9f99 (patch) | |
tree | deda996aedf77aac3eb91869ecc2c657da9f5090 /lib | |
parent | 51a805e0cf2d82795e738691dba9b3569bb9b555 (diff) |
Dark theme
Diffstat (limited to 'lib')
-rw-r--r-- | lib/main.dart | 6 | ||||
-rw-r--r-- | lib/page_dashboard.dart | 22 | ||||
-rw-r--r-- | lib/page_hvac.dart | 2 |
3 files changed, 16 insertions, 14 deletions
diff --git a/lib/main.dart b/lib/main.dart index 207ef3d..5335eda 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -13,7 +13,13 @@ class MyApp extends StatelessWidget { title: 'Flutter Homescreen', theme: ThemeData( primarySwatch: Colors.blue, + brightness: Brightness.light, ), + darkTheme: ThemeData( + brightness: Brightness.dark, + /* dark theme settings */ + ), + themeMode: ThemeMode.dark, home: Homescreen(title: 'Flutter Homescreen'), ); } diff --git a/lib/page_dashboard.dart b/lib/page_dashboard.dart index 172a38a..9b36f87 100644 --- a/lib/page_dashboard.dart +++ b/lib/page_dashboard.dart @@ -8,7 +8,11 @@ class DashboardPage extends StatelessWidget { Widget build(BuildContext context) { var sizeHelper = LayoutSizeHelper(context); return Container( - color: Colors.indigo.shade50, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topRight, + end: Alignment.bottomLeft, + colors: [Colors.teal.shade900, Colors.grey.shade900])), constraints: BoxConstraints.expand(), alignment: Alignment.center, child: Column( @@ -93,7 +97,6 @@ class _RPMWidget extends StatelessWidget { Container( height: sizeHelper.largeIconSize, width: sizeHelper.largeIconSize, - margin: EdgeInsets.all(sizeHelper.largePadding), child: RotatedBox( quarterTurns: 2, child: CircularProgressIndicator( @@ -112,24 +115,19 @@ class _FuelWidget extends StatelessWidget { @override Widget build(BuildContext context) { var sizeHelper = LayoutSizeHelper(context); - return Stack( - alignment: Alignment.center, + return Row( children: [ Text( 'Fuel', style: Theme.of(context).textTheme.headline4, ), Container( - height: sizeHelper.largeIconSize, + height: sizeHelper.largeIconSize / 4.0, width: sizeHelper.largeIconSize, margin: EdgeInsets.all(sizeHelper.largePadding), - child: RotatedBox( - quarterTurns: 2, - child: CircularProgressIndicator( - value: 0.75, - strokeWidth: sizeHelper.largeIconSize / 4.0, - semanticsLabel: 'RPM indicator', - ), + child: LinearProgressIndicator( + value: 0.75, + semanticsLabel: 'RPM indicator', ), ) ], diff --git a/lib/page_hvac.dart b/lib/page_hvac.dart index d416a1b..07cc772 100644 --- a/lib/page_hvac.dart +++ b/lib/page_hvac.dart @@ -39,7 +39,6 @@ class _TemperatureSelectorState extends State<_TemperatureSelector> { fontSize: sizeHelper.baseFontSize, ), selectedTextStyle: DefaultTextStyle.of(context).style.copyWith( - color: Colors.white, fontSize: sizeHelper.baseFontSize * 1.5, ), itemHeight: sizeHelper.baseFontSize * 3, @@ -104,7 +103,6 @@ class _HVACPageState extends State<HVACPage> { Widget build(BuildContext context) { var sizeHelper = LayoutSizeHelper(context); TextStyle buttonTextStyle = DefaultTextStyle.of(context).style.copyWith( - color: Colors.white, fontSize: sizeHelper.baseFontSize, ); |