CHOO CHOO ICONNNNN

This commit is contained in:
2024-01-04 22:58:59 +02:00
parent 100645fa20
commit e16431f30b
46 changed files with 112 additions and 83 deletions

View File

@@ -9,7 +9,7 @@ class Settings extends StatefulWidget {
}
class _Settings extends State<Settings> {
late String selectedTheme = 'Dark'; // Default app theme
late String selectedTheme = 'System Default'; // Default app theme
@override
Widget build(BuildContext context) {

View File

@@ -43,12 +43,27 @@ class _FetchAPIState extends State<FetchAPI> {
future: fetchedArrivals,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const CircularProgressIndicator();
}
else if (snapshot.hasError) {
return Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
height: MediaQuery. of(context). size. height / 2,
width: MediaQuery. of(context). size. width / 3,
child: const CircularProgressIndicator(),
),
],
),
],
),
);
} else if (snapshot.hasError) {
return Text('Failed to fetch data.\nError: ${snapshot.error}');
}
else {
} else {
return ListView.builder(
// List items to display
itemCount: snapshot.data!.length,
@@ -70,7 +85,9 @@ class _FetchAPIState extends State<FetchAPI> {
),
),
),
const SizedBox(height: 30,),
InkWell(
// Navigating Home
onTap: () {

View File

@@ -22,7 +22,7 @@ class MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Entry Point",
title: "WITL App",
theme: ThemeData(
primarySwatch: Colors.blue,
primaryColor: Colors.white,
@@ -35,16 +35,15 @@ class MyAppState extends State<MyApp> {
primarySwatch: Colors.blue,
primaryColor: Colors.black,
brightness: Brightness.dark,
dividerColor: Colors.black12,
dividerColor: Colors.white38,
scaffoldBackgroundColor: const Color(0xFF131313),
),
themeMode: _theme,
// Navigashun with Routes
// Base "Home" Route
initialRoute: '/',
initialRoute: '/home',
// Possible Routes
routes: {