From 750834c37a9f07db1e230df6e7cd4fa1554d6c46 Mon Sep 17 00:00:00 2001 From: Ishan Kumar Date: Thu, 19 Mar 2026 17:12:55 -0400 Subject: [PATCH 1/4] made the dialog take in strings not widgets. Replaced where it showed up in the code --- lib/screens/map_screen.dart | 12 ++++++------ lib/widgets/building_sheet.dart | 4 ++-- lib/widgets/dialog.dart | 8 ++++---- lib/widgets/directions_sheet.dart | 12 ++++++------ lib/widgets/favorites_sheet.dart | 4 ++-- lib/widgets/mini_stop_sheet.dart | 4 +++- lib/widgets/route_selector_modal.dart | 4 ++-- lib/widgets/stop_sheet.dart | 4 ++-- 8 files changed, 27 insertions(+), 25 deletions(-) diff --git a/lib/screens/map_screen.dart b/lib/screens/map_screen.dart index 8ccee2d..78a13ef 100644 --- a/lib/screens/map_screen.dart +++ b/lib/screens/map_screen.dart @@ -268,8 +268,8 @@ class _MaizeBusCoreState extends State { if (startupData.persistantMessageTitle != '') { showMaizebusOKDialog( contextIn: context, - title: Text(startupData.persistantMessageTitle), - content: Text(startupData.persistantMessage), + title: startupData.persistantMessageTitle, + content: startupData.persistantMessage, ); } @@ -1810,8 +1810,8 @@ class _MaizeBusCoreState extends State { } else { showMaizebusOKDialog( contextIn: context, - title: const Text("Error"), - content: const Text("Couldn't load stop."), + title: "Error", + content: "Couldn't load stop.", ); } }, @@ -1836,8 +1836,8 @@ class _MaizeBusCoreState extends State { } else { showMaizebusOKDialog( contextIn: context, - title: const Text('Error'), - content: const Text('Couldn\'t load stop.'), + title: 'Error', + content: 'Couldn\'t load stop.', ); } }, diff --git a/lib/widgets/building_sheet.dart b/lib/widgets/building_sheet.dart index e316a21..f7b6848 100644 --- a/lib/widgets/building_sheet.dart +++ b/lib/widgets/building_sheet.dart @@ -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", ); } diff --git a/lib/widgets/dialog.dart b/lib/widgets/dialog.dart index 75a2f32..cf3cf27 100644 --- a/lib/widgets/dialog.dart +++ b/lib/widgets/dialog.dart @@ -5,8 +5,8 @@ import 'package:flutter/material.dart'; /// maizebus style to all dialogs in the app. Future showMaizebusOKDialog({ required BuildContext contextIn, - Widget? title, - Widget? content, + required String title, + required String content, }) { return showDialog( context: contextIn, @@ -32,8 +32,8 @@ Future showMaizebusOKDialog({ 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, diff --git a/lib/widgets/directions_sheet.dart b/lib/widgets/directions_sheet.dart index cae5597..81559c2 100644 --- a/lib/widgets/directions_sheet.dart +++ b/lib/widgets/directions_sheet.dart @@ -302,20 +302,20 @@ class _DirectionsSheetState extends State { 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.", ); } }); diff --git a/lib/widgets/favorites_sheet.dart b/lib/widgets/favorites_sheet.dart index 3b16dac..f7f17d7 100644 --- a/lib/widgets/favorites_sheet.dart +++ b/lib/widgets/favorites_sheet.dart @@ -160,8 +160,8 @@ class _FavoritesSheetState extends State { 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!", ); }); diff --git a/lib/widgets/mini_stop_sheet.dart b/lib/widgets/mini_stop_sheet.dart index 06e4a0f..de7734b 100644 --- a/lib/widgets/mini_stop_sheet.dart +++ b/lib/widgets/mini_stop_sheet.dart @@ -106,7 +106,9 @@ class _MiniStopSheetState extends State { onTap: () { widget.onUnfavorite(); }, - child: Icon(Icons.delete_outline) + // changed this icon from a trash to a close + // because I think it looks better + child: Icon(Icons.close) ) ], ), diff --git a/lib/widgets/route_selector_modal.dart b/lib/widgets/route_selector_modal.dart index 2065de4..4cff57b 100644 --- a/lib/widgets/route_selector_modal.dart +++ b/lib/widgets/route_selector_modal.dart @@ -637,8 +637,8 @@ class _RouteSelectorModalState extends State { 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( diff --git a/lib/widgets/stop_sheet.dart b/lib/widgets/stop_sheet.dart index a8ef262..28a21c7 100644 --- a/lib/widgets/stop_sheet.dart +++ b/lib/widgets/stop_sheet.dart @@ -874,8 +874,8 @@ class _ReminderFormState extends State { 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(); From 6cb6295dacd860dbe2957bfe37b965451753f307 Mon Sep 17 00:00:00 2001 From: Ishan Kumar Date: Sun, 22 Mar 2026 20:57:26 -0400 Subject: [PATCH 2/4] undid change --- lib/widgets/mini_stop_sheet.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/widgets/mini_stop_sheet.dart b/lib/widgets/mini_stop_sheet.dart index de7734b..f6f0d84 100644 --- a/lib/widgets/mini_stop_sheet.dart +++ b/lib/widgets/mini_stop_sheet.dart @@ -106,9 +106,7 @@ class _MiniStopSheetState extends State { onTap: () { widget.onUnfavorite(); }, - // changed this icon from a trash to a close - // because I think it looks better - child: Icon(Icons.close) + child: Icon(Icons.delete_outline ) ], ), From 6a6db2c3c9e8e198cc3355a56864ab4c7bd672f3 Mon Sep 17 00:00:00 2001 From: Ishan Kumar Date: Sun, 22 Mar 2026 20:57:50 -0400 Subject: [PATCH 3/4] undid change --- lib/widgets/mini_stop_sheet.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/widgets/mini_stop_sheet.dart b/lib/widgets/mini_stop_sheet.dart index f6f0d84..bf8561c 100644 --- a/lib/widgets/mini_stop_sheet.dart +++ b/lib/widgets/mini_stop_sheet.dart @@ -105,8 +105,8 @@ class _MiniStopSheetState extends State { GestureDetector( onTap: () { widget.onUnfavorite(); - }, - child: Icon(Icons.delete_outline + } + child: Icon(Icons.delete_outline) ) ], ), From 01512243f37d74f9ef46c6b1e21fb05382f7cabf Mon Sep 17 00:00:00 2001 From: Ishan Kumar Date: Mon, 23 Mar 2026 18:02:14 -0400 Subject: [PATCH 4/4] fixed comma --- lib/widgets/mini_stop_sheet.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/mini_stop_sheet.dart b/lib/widgets/mini_stop_sheet.dart index bf8561c..06e4a0f 100644 --- a/lib/widgets/mini_stop_sheet.dart +++ b/lib/widgets/mini_stop_sheet.dart @@ -105,7 +105,7 @@ class _MiniStopSheetState extends State { GestureDetector( onTap: () { widget.onUnfavorite(); - } + }, child: Icon(Icons.delete_outline) ) ],