more pleasant progress handling, although somewhat flawed
This commit is contained in:
@@ -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,),
|
||||
]
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user