Cleaned up idk
This commit is contained in:
@@ -13,6 +13,8 @@ class Arrival {
|
||||
|
||||
factory Arrival.fromJson(Map<String, dynamic> json) {
|
||||
return Arrival(
|
||||
// Key value
|
||||
// <field>: json['<field_name_in_json>'] as <data_type>
|
||||
// Arrival Time
|
||||
timeOfDay: json['time_of_day'] as String,
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class _FetchAPIState extends State<FetchAPI> {
|
||||
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<FetchAPI> {
|
||||
},
|
||||
icon: const Icon(Icons.refresh_sharp),
|
||||
),
|
||||
|
||||
// Spacer
|
||||
const SizedBox(width: 30,),
|
||||
],
|
||||
),
|
||||
// RefreshIndicator is used so that user can pull down
|
||||
|
||||
@@ -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,),
|
||||
]
|
||||
),
|
||||
),
|
||||
|
||||
@@ -117,7 +117,7 @@ class _InputDataState extends State<InputData> {
|
||||
|
||||
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
|
||||
});
|
||||
},
|
||||
),
|
||||
|
||||
@@ -10,13 +10,13 @@ class MyApp extends StatefulWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
State<MyApp> createState() => MyAppState();
|
||||
|
||||
static _MyAppState of(BuildContext context) =>
|
||||
context.findAncestorStateOfType<_MyAppState>()!;
|
||||
static MyAppState of(BuildContext context) =>
|
||||
context.findAncestorStateOfType<MyAppState>()!;
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
class MyAppState extends State<MyApp> {
|
||||
ThemeMode _theme = ThemeMode.system;
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user