Tachostand in Graph hizugefügt

This commit is contained in:
2026-02-20 11:25:26 +01:00
parent 2941354c77
commit a79c55cb14
10 changed files with 331 additions and 525 deletions

View File

@@ -7,6 +7,7 @@ class GraphController extends GetxController {
final sumYearLiters = 0.0.obs;
final sumYearPrice = 0.0.obs;
final averagePricePerLiter = 0.0.obs;
final szTachostand = ''.obs;
@override
void onInit() {
@@ -44,6 +45,7 @@ class GraphController extends GetxController {
var lastOdometer = double.tryParse(listTankModel.last.szOdometer) ?? 0.0;
sumYearKm.value = lastOdometer - firstOdometer;
szTachostand.value = listTankModel.last.szOdometer;
double totalLiters = 0.0;
double totalPrice = 0.0;

View File

@@ -49,9 +49,17 @@ class GraphPage extends GetView<GraphController> {
DetailInfoCardWidget(
title: 'Jahresstatistik',
children: [
DetailStatWidget(
icon: Icons.speed,
label: 'Tachostand',
value: '${graphCtrl.szTachostand.value} KM',
iconColor: Colors.orange.shade900,
valueSize: 24,
valueWeight: FontWeight.bold,
),
DetailStatWidget(
icon: Icons.directions_car,
label: 'Jahreskilometerstand',
label: 'Jahreskilometerverbrauch',
value: '${graphCtrl.sumYearKm.value} KM',
iconColor: Colors.blue,
valueSize: 24,