BinghamtonBetterBus-v2/src/client/lib/widgets.dart
Levi Lesches 8fdb25f15e
Allow users to pick stops on the map and sidebar (#10)
- download all stops on startup, sort by route
- refactored lat/long textboxes into custom widget
- added a button to show the stops list
- sidebar to filter which routes can show
- clicking on a stop or the map adds that marker to the start/end
2025-05-02 00:09:00 -04:00

21 lines
749 B
Dart

import "package:flutter/material.dart";
export "package:go_router/go_router.dart";
export "src/widgets/lat_long_editor.dart";
export "src/widgets/reactive_widget.dart";
/// Helpful methods on [BuildContext].
extension ContextUtils on BuildContext {
/// Gets the app's color scheme.
ColorScheme get colorScheme => Theme.of(this).colorScheme;
/// Gets the app's text theme.
TextTheme get textTheme => Theme.of(this).textTheme;
/// Formats a date according to the user's locale.
String formatDate(DateTime date) => MaterialLocalizations.of(this).formatCompactDate(date);
/// Formats a time according to the user's locale.
String formatTime(DateTime time) => MaterialLocalizations.of(this).formatTimeOfDay(TimeOfDay.fromDateTime(time));
}