more pleasant progress handling, although somewhat flawed

This commit is contained in:
2025-02-14 12:23:41 +01:00
parent aed407e2d0
commit 8f6dfd404d
8 changed files with 287 additions and 172 deletions

View File

@@ -15,17 +15,27 @@ class CurrentTripSummary extends StatefulWidget {
class _CurrentTripSummaryState extends State<CurrentTripSummary> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Text('Summary'),
// Text('Start: ${widget.trip.start}'),
// Text('End: ${widget.trip.end}'),
Text('Total duration: ${widget.trip.totalTime}'),
Text('Total distance: ${widget.trip.totalTime}'),
// Text('Fuel: ${widget.trip.fuel}'),
// Text('Cost: ${widget.trip.cost}'),
],
return Padding(
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Icon(Icons.flag, size: 20),
Padding(padding: EdgeInsets.only(right: 10)),
Text('Stops: ${widget.trip.landmarks.length}', style: Theme.of(context).textTheme.bodyLarge,),
]
),
Row(
children: [
Icon(Icons.hourglass_bottom_rounded, size: 20),
Padding(padding: EdgeInsets.only(right: 10)),
Text('Duration: ${widget.trip.totalTime} minutes', style: Theme.of(context).textTheme.bodyLarge,),
]
),
],
)
);
}
}
}