summaryrefslogtreecommitdiffstats
path: root/lib/Tier_pressure.dart
diff options
context:
space:
mode:
authorHritik Chouhan <hritikc3961@gmail.com>2022-09-01 20:46:09 +0200
committerHritik Chouhan <hritikc3961@gmail.com>2022-09-16 18:24:43 +0200
commit10945b8056eb2b228c156918a3505882a49a79b8 (patch)
treec8190f53a85ceaf31d9b978cb3d61941bb7a8bc4 /lib/Tier_pressure.dart
parentcb0d87bfb6b6daf9ad22ab76d333e70451602406 (diff)
Upload Flutter-Dashboard app for IVI
Flutter Dashboard app which shows Tyres Pressure, Child lock status , Current Location,Speed,RPM,outside and inside Temperature , Average fuel Consumption. update UI and Removed Unused code. Moved kuksa authtoken and mapbox access token and other things to config file. Bug-AGL: SPEC-4547 Signed-off-by: Hritik Chouhan <hritikc3961@gmail.com> Change-Id: I14f42ed453c8279a1e89f8835d2b24e07e4ce376
Diffstat (limited to 'lib/Tier_pressure.dart')
-rw-r--r--lib/Tier_pressure.dart60
1 files changed, 60 insertions, 0 deletions
diff --git a/lib/Tier_pressure.dart b/lib/Tier_pressure.dart
new file mode 100644
index 0000000..cb8ace5
--- /dev/null
+++ b/lib/Tier_pressure.dart
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: Apache-2.0
+import 'package:dashboard_app/size.dart';
+import 'package:flutter/material.dart';
+import 'package:percent_indicator/linear_percent_indicator.dart';
+
+
+
+class TierPressure extends StatefulWidget {
+ String tname;
+ double tpress;
+ CrossAxisAlignment crossAxisAlignment;
+ MainAxisAlignment mainAxisAlignment;
+ TierPressure(
+ {Key? key,
+ required this.tname,
+ required this.tpress,
+ required this.crossAxisAlignment,
+ required this.mainAxisAlignment})
+ : super(key: key);
+
+ @override
+ State<TierPressure> createState() => _TierPressureState();
+}
+
+class _TierPressureState extends State<TierPressure> {
+ @override
+ Widget build(BuildContext context) {
+ return SizedBox(
+ height: SizeConfig.safeBlockVertical * 12,
+ width: SizeConfig.safeBlockHorizontal * 14,
+ child: Column(
+ mainAxisAlignment: widget.mainAxisAlignment,
+
+ children: [
+ Text(
+ '${widget.tname}',
+ style: SizeConfig.smallnormalfont2,
+ ),
+ Text(
+ widget.tpress.toString() + ' PSI',
+ style: SizeConfig.smallnormalfont,
+ ),
+ LinearPercentIndicator(
+ width: SizeConfig.safeBlockHorizontal * 11,
+
+ progressColor: widget.tpress / 50 > 0.6 ? Colors.green : Colors.red,
+ lineHeight: SizeConfig.safeBlockVertical * 1.5,
+ alignment: MainAxisAlignment.center,
+ animateFromLastPercent: true,
+ animation: true,
+ percent: widget.tpress / 50,
+
+ barRadius: Radius.circular(SizeConfig.fontsize / 4),
+ backgroundColor: Colors.grey,
+ ),
+ ],
+ ),
+ );
+ }
+}