BinghamtonBetterBus-v2/src/client/lib/widgets.dart
Levi Lesches dc9a3b0e1d
Function client to send GET /path to server (#4)
* Created default project

* Added client to .vscode/launch.json

* Ignore .vscode/settings.json

* Some data scraping

* Client skeleton

* Client data types and fromJson() functions

* Final touches on JSON

* Added ApiService

* ApiService changes

* Prototype for stops

* ViewModel and UI

* Basic client UI
2025-04-02 15:39:57 -04:00

20 lines
714 B
Dart

import "package:flutter/material.dart";
export "package:go_router/go_router.dart";
export "src/widgets/generic/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));
}