Compare commits
No commits in common. "9002483036ebb27d3fd83190a587842edbaef0f4" and "d31ca9f81fb9cd85cf9a2f5399be6b6299bd90b9" have entirely different histories.
9002483036
...
d31ca9f81f
@ -19,7 +19,8 @@ class StepBetweenLandmarks extends StatefulWidget {
|
|||||||
class _StepBetweenLandmarksState extends State<StepBetweenLandmarks> {
|
class _StepBetweenLandmarksState extends State<StepBetweenLandmarks> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
int time = widget.current.tripTime?.inMinutes ?? 0;
|
int timeRounded = 5 * ((widget.current.tripTime?.inMinutes ?? 0) ~/ 5);
|
||||||
|
// ~/ is integer division (rounding)
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.all(10),
|
margin: EdgeInsets.all(10),
|
||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(10),
|
||||||
@ -33,7 +34,7 @@ class _StepBetweenLandmarksState extends State<StepBetweenLandmarks> {
|
|||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.directions_walk),
|
Icon(Icons.directions_walk),
|
||||||
Text("$time min", style: TextStyle(fontSize: 10)),
|
Text("~$timeRounded min", style: TextStyle(fontSize: 10)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user