aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Erias <felipeerias@igalia.com>2021-11-12 15:36:12 +0900
committerFelipe Erias <felipeerias@igalia.com>2021-11-12 15:36:12 +0900
commit8c32227596b5de15417e667cca84178a157543a1 (patch)
treeb1db2feda775b1aee41bebc306481d45a5bf70eb
parent3cdd54458bfc6ba0066cb2a82c4a91bd4baf9b82 (diff)
Visual appearance of main navigation
-rw-r--r--lib/homescreen.dart8
-rw-r--r--lib/page_dashboard.dart67
-rw-r--r--lib/page_home.dart8
-rw-r--r--lib/page_hvac.dart2
-rw-r--r--lib/page_media.dart2
5 files changed, 73 insertions, 14 deletions
diff --git a/lib/homescreen.dart b/lib/homescreen.dart
index 9879342..b78a5d2 100644
--- a/lib/homescreen.dart
+++ b/lib/homescreen.dart
@@ -28,7 +28,8 @@ class _HomescreenState extends State<Homescreen> with TickerProviderStateMixin {
@override
Widget build(BuildContext context) {
var screenHeight = MediaQuery.of(context).size.height;
- var iconSize = screenHeight / 5;
+ var iconSize = screenHeight / 6;
+ var railSize = screenHeight / 5;
return Scaffold(
body: Row(
@@ -39,8 +40,9 @@ class _HomescreenState extends State<Homescreen> with TickerProviderStateMixin {
backgroundColor: Colors.black12,
selectedIndex: _selectedIndex,
groupAlignment: -1.0,
- minWidth: iconSize,
+ minWidth: railSize,
// leading widget?
+ // leading: Icon(Icons.house_outlined, size: iconSize),
// trailing widget does not expand to bottom
onDestinationSelected: (int index) {
setNavigationIndex(index);
@@ -82,7 +84,7 @@ class _HomescreenState extends State<Homescreen> with TickerProviderStateMixin {
left: 0,
right: 0,
// This is the info widget with time, date, etc.
- child: ClockWiddget(size: iconSize),
+ child: ClockWiddget(size: railSize),
)
],
),
diff --git a/lib/page_dashboard.dart b/lib/page_dashboard.dart
index 17258a8..bce7590 100644
--- a/lib/page_dashboard.dart
+++ b/lib/page_dashboard.dart
@@ -5,14 +5,71 @@ class DashboardPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ var screenHeight = MediaQuery.of(context).size.height;
+ var iconSize = screenHeight / 8;
+
return Container(
- color: Colors.lightGreen,
+ color: Colors.indigo.shade50,
constraints: BoxConstraints.expand(),
alignment: Alignment.center,
- child: Text(
- 'Dashboard',
- style: Theme.of(context).textTheme.headline1,
- ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Text(
+ '0 kpm',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Text(
+ 'Left front tire',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ Text(
+ 'Left rear tire',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ ],
+ ),
+ Icon(
+ Icons.drive_eta,
+ size: iconSize,
+ color: Colors.indigo.shade800,
+ ),
+ Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Text(
+ 'Right front tire',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ Text(
+ 'Right rear tire',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ ],
+ ),
+ ],
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Text(
+ 'RPM',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ Text(
+ 'Fuel',
+ style: Theme.of(context).textTheme.headline4,
+ ),
+ ],
+ )
+ ],
+ ),
);
}
}
diff --git a/lib/page_home.dart b/lib/page_home.dart
index 1084a4f..1fbda1f 100644
--- a/lib/page_home.dart
+++ b/lib/page_home.dart
@@ -11,7 +11,7 @@ class HomePage extends StatelessWidget {
final double spacing = MediaQuery.of(context).size.width / 32;
final double runSpacing = spacing / 2;
return Container(
- color: Colors.white,
+ color: Colors.lightBlue.shade50,
constraints: BoxConstraints.expand(),
alignment: Alignment.center,
child: Wrap(
@@ -35,15 +35,15 @@ class HomePage extends StatelessWidget {
style: OutlinedButton.styleFrom(
shape: CircleBorder(),
padding: EdgeInsets.all(padding),
- primary: Colors.blue,
- side: BorderSide(width: border, color: Colors.lightBlue.shade50)
+ primary: Colors.lightBlue.shade400,
+ side: BorderSide(width: border, color: Colors.lightBlue.shade400)
),
onPressed: () {
onSetNavigationIndex(tabPosition);
},
child: Icon(
icon,
- color: Colors.blue,
+ color: Colors.lightBlue.shade800,
size: size / 2,
),
),
diff --git a/lib/page_hvac.dart b/lib/page_hvac.dart
index 5715290..ea38cb9 100644
--- a/lib/page_hvac.dart
+++ b/lib/page_hvac.dart
@@ -6,7 +6,7 @@ class HVACPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
- color: Colors.yellow,
+ color: Colors.lime.shade50,
constraints: BoxConstraints.expand(),
alignment: Alignment.center,
child: Text(
diff --git a/lib/page_media.dart b/lib/page_media.dart
index b3e0c75..9b61bea 100644
--- a/lib/page_media.dart
+++ b/lib/page_media.dart
@@ -7,7 +7,7 @@ class MediaPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
- color: Colors.lightBlue,
+ color: Colors.deepPurple.shade50,
constraints: BoxConstraints.expand(),
alignment: Alignment.center,
child: Text(