@@ -14,7 +14,7 @@ class Metrics extends HookConsumerWidget {
1414 @override
1515 Widget build (BuildContext context, WidgetRef ref) {
1616 final state = ref.watch (metricsViewModelProvider);
17- const textStyle = TextStyle (fontSize: 30.0 );
17+ const textStyle = TextStyle (fontSize: 26.0 , fontWeight : FontWeight .bold );
1818
1919 double speedToDisplay = state.globalSpeed;
2020 double distanceToDisplay = state.distance;
@@ -28,22 +28,36 @@ class Metrics extends HookConsumerWidget {
2828
2929 return Center (
3030 child: Row (
31- mainAxisSize: MainAxisSize .min,
3231 mainAxisAlignment: MainAxisAlignment .spaceEvenly,
3332 children: [
34- const Icon (Icons .location_on),
35- const SizedBox (width: 8 ),
36- Text (
37- '${distanceToDisplay .toStringAsFixed (2 )} km' ,
38- style: textStyle,
39- ),
40- const SizedBox (width: 40 ),
41- const Icon (Icons .speed),
42- const SizedBox (width: 8 ),
43- Text (
44- '${speedToDisplay .toStringAsFixed (2 )} km/h' ,
45- style: textStyle,
46- ),
33+ Row (children: [
34+ const Icon (
35+ Icons .location_on,
36+ size: 45 ,
37+ ),
38+ const SizedBox (width: 8 ),
39+ Column (children: [
40+ Text (
41+ distanceToDisplay.toStringAsFixed (2 ),
42+ style: textStyle,
43+ ),
44+ const Text ('km' ),
45+ ])
46+ ]),
47+ Row (children: [
48+ Column (mainAxisAlignment: MainAxisAlignment .start, children: [
49+ Text (
50+ speedToDisplay.toStringAsFixed (2 ),
51+ style: textStyle,
52+ ),
53+ const Text ('km/h' ),
54+ ]),
55+ const SizedBox (width: 8 ),
56+ const Icon (
57+ Icons .speed,
58+ size: 45 ,
59+ ),
60+ ])
4761 ],
4862 ),
4963 );
0 commit comments