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 19, 2023
1 parent 2f1e8a1 commit 10abf2a
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 @@ -36,7 +36,7 @@ class FinishRideButton extends StatelessWidget {
actions: [
BigButtonPrimary(
label: "Fahrt beenden",
onPressed: () => onTap(),
onPressed: () => endRide(context),
boxConstraints: BoxConstraints(minWidth: MediaQuery.of(context).size.width, minHeight: 36),
),
BigButtonTertiary(
Expand All @@ -52,7 +52,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 10abf2a

Please sign in to comment.