Submit Button, Navigation Changes

This commit is contained in:
2023-12-25 18:25:01 +02:00
parent 0cfd9592f3
commit f586eb826c
2 changed files with 62 additions and 14 deletions

View File

@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:witl/fetcher.dart';
import 'package:witl/home_screen.dart';
import 'package:witl/input_data.dart';
void main() => runApp(const MyApp());
@@ -13,7 +15,22 @@ class MyApp extends StatelessWidget {
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomeScreen(),
// Navigashun with Routes
// Base "Home" Route
initialRoute: '/',
// Possible Routes
routes: {
// Homescreen
'/': (context) => const HomeScreen(),
// Fetching API Data
'/fetch': (context) => const FetchAPI(),
// User Input
'/input': (context) => const InputData(),
},
);
}
}