Skip to content

Commit

Permalink
Rename finishRideButton callback
Browse files Browse the repository at this point in the history
  • Loading branch information
kruegercharles committed Dec 14, 2023
1 parent 773368c commit 78c6197
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/ride/views/finish_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class FinishRideButton extends StatelessWidget {
iconColor: Colors.white,
icon: Icons.flag_rounded,
label: "Ja",
onPressed: () => onTap(context),
onPressed: () => endRide(context),
boxConstraints: BoxConstraints(minWidth: MediaQuery.of(context).size.width),
),
BigButton(
Expand All @@ -57,7 +57,7 @@ class FinishRideButton extends StatelessWidget {
}

/// A callback that is executed when the cancel button is pressed.
Future<void> onTap(context) async {
Future<void> endRide(context) async {
// Allows only portrait mode again when leaving the ride view.
await SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
Expand Down
2 changes: 1 addition & 1 deletion lib/ride/views/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class RideViewState extends State<RideView> {
);
},
);
await finishRideButton.onTap(context);
await finishRideButton.endRide(context);
}

/// Called when the user moves the map.
Expand Down

0 comments on commit 78c6197

Please sign in to comment.