Removes the rounding from the trip details #56
| @@ -19,8 +19,7 @@ class StepBetweenLandmarks extends StatefulWidget { | ||||
| class _StepBetweenLandmarksState extends State<StepBetweenLandmarks> { | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     int timeRounded = 5 * ((widget.current.tripTime?.inMinutes ?? 0) ~/ 5); | ||||
|     // ~/ is integer division (rounding) | ||||
|     int time = widget.current.tripTime?.inMinutes ?? 0; | ||||
|     return Container( | ||||
|       margin: EdgeInsets.all(10), | ||||
|       padding: EdgeInsets.all(10), | ||||
| @@ -34,7 +33,7 @@ class _StepBetweenLandmarksState extends State<StepBetweenLandmarks> { | ||||
|           Column( | ||||
|             children: [ | ||||
|               Icon(Icons.directions_walk), | ||||
|               Text("~$timeRounded min", style: TextStyle(fontSize: 10)), | ||||
|               Text("$time min", style: TextStyle(fontSize: 10)), | ||||
|             ], | ||||
|           ), | ||||
|           Spacer(), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user