Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/screens/map_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ class _MaizeBusCoreState extends State<MaizeBusCore> {
if (startupData.persistantMessageTitle != '') {
showMaizebusOKDialog(
contextIn: context,
title: Text(startupData.persistantMessageTitle),
content: Text(startupData.persistantMessage),
title: startupData.persistantMessageTitle,
content: startupData.persistantMessage,
);
}

Expand Down Expand Up @@ -1810,8 +1810,8 @@ class _MaizeBusCoreState extends State<MaizeBusCore> {
} else {
showMaizebusOKDialog(
contextIn: context,
title: const Text("Error"),
content: const Text("Couldn't load stop."),
title: "Error",
content: "Couldn't load stop.",
);
}
},
Expand All @@ -1836,8 +1836,8 @@ class _MaizeBusCoreState extends State<MaizeBusCore> {
} else {
showMaizebusOKDialog(
contextIn: context,
title: const Text('Error'),
content: const Text('Couldn\'t load stop.'),
title: 'Error',
content: 'Couldn\'t load stop.',
);
}
},
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/building_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ void sendEmailWithSender(BuildContext context, String emailSubject, String email
void showFallbackOptions(BuildContext context) {
showMaizebusOKDialog(
contextIn: context,
title: const Text("Email-Send failed"),
content: const Text("Unable to reach the email app on your device. You can still send us feedback by manually emailing contact@maizebus.com"),
title: "Email-Send failed",
content: "Unable to reach the email app on your device. You can still send us feedback by manually emailing contact@maizebus.com",
);
}

Expand Down
8 changes: 4 additions & 4 deletions lib/widgets/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:flutter/material.dart';
/// maizebus style to all dialogs in the app.
Future<T?> showMaizebusOKDialog<T>({
required BuildContext contextIn,
Widget? title,
Widget? content,
required String title,
required String content,
}) {
return showDialog<T>(
context: contextIn,
Expand All @@ -32,8 +32,8 @@ Future<T?> showMaizebusOKDialog<T>({
actionsPadding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
actionsAlignment: MainAxisAlignment.end,

title: title,
content: content,
title: Text(title),
content: Text(content),
actions: [
SizedBox(
width: double.infinity,
Expand Down
12 changes: 6 additions & 6 deletions lib/widgets/directions_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -302,20 +302,20 @@ class _DirectionsSheetState extends State<DirectionsSheet> {
if (journeyload.error is LocationError) {
showMaizebusOKDialog(
contextIn: context,
title: const Text("Location Error"),
content: const Text("Please make sure you have location permissions enabled in settings before trying to get directions"),
title: "Location Error",
content: "Please make sure you have location permissions enabled in settings before trying to get directions",
);
} else if (journeyload.error is NotInAnnArborError) {
showMaizebusOKDialog(
contextIn: context,
title: const Text("Not in Ann Arbor"),
content: const Text("Please make sure you are in Ann Arbor before trying to get on-campus bus directions"),
title: "Not in Ann Arbor",
content: "Please make sure you are in Ann Arbor before trying to get on-campus bus directions",
);
} else {
showMaizebusOKDialog(
contextIn: context,
title: const Text("Unknown Error"),
content: const Text("An unknown error occurred while trying to get directions. Please contact contact@maizebus.com if this persists."),
title: "Unknown Error",
content: "An unknown error occurred while trying to get directions. Please contact contact@maizebus.com if this persists.",
);
}
});
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/favorites_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ class _FavoritesSheetState extends State<FavoritesSheet> {

showMaizebusOKDialog(
contextIn: context,
title: const Text("No Favorites"),
content: const Text("Hit the heart icon on a stop to add it to your favorites and see it here!"),
title: "No Favorites",
content: "Hit the heart icon on a stop to add it to your favorites and see it here!",
);
});

Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/route_selector_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,8 @@ class _RouteSelectorModalState extends State<RouteSelectorModal> {
onPressed: () {
showMaizebusOKDialog(
contextIn: context,
title: const Text("Route Selector"),
content: const Text("Tap a route to show it on the map. Drag and drop to reorder routes. Long press to select only that route"),
title: "Route Selector",
content: "Tap a route to show it on the map. Drag and drop to reorder routes. Long press to select only that route",
);
},
style: IconButton.styleFrom(
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/stop_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,8 @@ class _ReminderFormState extends State<ReminderForm> {

showMaizebusOKDialog(
contextIn: context,
title: Text("Failed to load reminders"),
content: Text("Make sure you have the notification permission enabled in settings. If this error is persistent, please send us feedback through the feedback form in the settings page"),
title: "Failed to load reminders",
content: "Make sure you have the notification permission enabled in settings. If this error is persistent, please send us feedback through the feedback form in the settings page",
);
});
return SizedBox.shrink();
Expand Down