1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
import 'package:flutter/material.dart';
class DashboardPage extends StatelessWidget {
const DashboardPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
var screenHeight = MediaQuery.of(context).size.height;
var iconSize = screenHeight / 8;
return Container(
color: Colors.indigo.shade50,
constraints: BoxConstraints.expand(),
alignment: Alignment.center,
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: [
_RPMWidget(),
Text(
'Fuel',
style: Theme.of(context).textTheme.headline4,
),
],
)
],
),
);
}
}
// ignore: unused_element
class _RPMWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Icon(Icons.fastfood),
Container(
height: 20,
width: 70,
child: LinearProgressIndicator(
value: 0.75,
semanticsLabel: 'Linear progress indicator',
),
),
],
);
}
}
|