diff --git a/lib/arrival.dart b/lib/arrival.dart index c9b0d28..ba949d3 100644 --- a/lib/arrival.dart +++ b/lib/arrival.dart @@ -13,6 +13,8 @@ class Arrival { factory Arrival.fromJson(Map json) { return Arrival( + // Key value + // : json[''] as // Arrival Time timeOfDay: json['time_of_day'] as String, diff --git a/lib/fetcher.dart b/lib/fetcher.dart index 44a24d9..3dc8770 100644 --- a/lib/fetcher.dart +++ b/lib/fetcher.dart @@ -16,7 +16,7 @@ class _FetchAPIState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text("Fetching API"), + title: const Text("Fetched Arrivals"), actions: [ // Refresh fetched list IconButton( @@ -27,9 +27,6 @@ class _FetchAPIState extends State { }, icon: const Icon(Icons.refresh_sharp), ), - - // Spacer - const SizedBox(width: 30,), ], ), // RefreshIndicator is used so that user can pull down diff --git a/lib/home_screen.dart b/lib/home_screen.dart index 12852ca..a850a77 100644 --- a/lib/home_screen.dart +++ b/lib/home_screen.dart @@ -36,9 +36,6 @@ class HomeScreen extends StatelessWidget { MaterialPageRoute(builder: (context) => const Settings()) );}, icon: const Icon(Icons.settings)), - - // Space from the end - const SizedBox(width: 30,), ] ), ), diff --git a/lib/input_data.dart b/lib/input_data.dart index e039c8f..a9b1aa1 100644 --- a/lib/input_data.dart +++ b/lib/input_data.dart @@ -117,7 +117,7 @@ class _InputDataState extends State { onChanged: (String? newEnd) { setState(() { - selectedDirection = newEnd ?? 'Victoria'; // Set a default value if newLine is null + selectedDirection = newEnd ?? selectedDirection; // Set a default value if newLine is null }); }, ), diff --git a/lib/main.dart b/lib/main.dart index e964e66..3e09e7d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -10,13 +10,13 @@ class MyApp extends StatefulWidget { const MyApp({super.key}); @override - State createState() => _MyAppState(); + State createState() => MyAppState(); - static _MyAppState of(BuildContext context) => - context.findAncestorStateOfType<_MyAppState>()!; + static MyAppState of(BuildContext context) => + context.findAncestorStateOfType()!; } -class _MyAppState extends State { +class MyAppState extends State { ThemeMode _theme = ThemeMode.system; @override