Compare commits

...

4 Commits

Author SHA1 Message Date
9002483036 Merge pull request 'Removes the rounding from the trip details' (#56) from frontend/no-more-rounding into main
Reviewed-on: #56
2025-02-07 18:09:31 +00:00
0271c3d7a7 removed rounding but app won't compile
Some checks failed
Build and release debug APK / Build APK (pull_request) Failing after 3m37s
2025-02-07 15:14:21 +01:00
4fd1272ea4 test
Some checks failed
Build and release debug APK / Build APK (pull_request) Failing after 3m7s
2025-02-07 15:08:00 +01:00
6bedd04a57 removed rounding
Some checks failed
Build and release debug APK / Build APK (pull_request) Failing after 4m10s
2025-02-07 14:44:18 +01:00

View File

@ -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(),