Merge pull request #1 from LinlyBoi/3-screens

3 screens
This commit is contained in:
Linly
2023-12-25 16:44:27 +02:00
committed by GitHub
132 changed files with 160 additions and 125 deletions

View File

@@ -41,3 +41,6 @@ app.*.map.json
/android/app/debug /android/app/debug
/android/app/profile /android/app/profile
/android/app/release /android/app/release
# VSCode stuffs
.vscode/

View File

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 544 B

View File

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 442 B

View File

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 721 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

View File

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

View File

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

46
lib/fetcher.dart Normal file
View File

@@ -0,0 +1,46 @@
import 'package:flutter/material.dart';
import 'package:witl/home_screen.dart';
import 'package:witl/input_data.dart';
class FetchAPI extends StatelessWidget {
const FetchAPI({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Fetching API"),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
InkWell(
onTap:() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const HomeScreen())
);
},
child: Container(
padding: const EdgeInsets.all(20.0),
child: const Text("To Homescreen")
),
),
const SizedBox(height: 20),
InkWell(
onTap:() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const InputData())
);
},
child: Container(
padding: const EdgeInsets.all(20.0),
child: const Text("To Input Data")
),
),
],
),
);
}
}

46
lib/home_screen.dart Normal file
View File

@@ -0,0 +1,46 @@
import 'package:flutter/material.dart';
import 'package:witl/fetcher.dart';
import 'package:witl/input_data.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Placeholder for Home Screen"),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
InkWell(
onTap:() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const FetchAPI())
);
},
child: Container(
padding: const EdgeInsets.all(20.0),
child: const Text("To Fetch Data")
),
),
const SizedBox(height: 20),
InkWell(
onTap:() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const InputData())
);
},
child: Container(
padding: const EdgeInsets.all(20.0),
child: const Text("To Input Data")
),
),
],
),
);
}
}

46
lib/input_data.dart Normal file
View File

@@ -0,0 +1,46 @@
import 'package:flutter/material.dart';
import 'package:witl/fetcher.dart';
import 'package:witl/home_screen.dart';
class InputData extends StatelessWidget {
const InputData({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Data Input"),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
InkWell(
onTap:() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const HomeScreen())
);
},
child: Container(
padding: const EdgeInsets.all(20.0),
child: const Text("To Homescreen")
),
),
const SizedBox(height: 20),
InkWell(
onTap:() {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const FetchAPI())
);
},
child: Container(
padding: const EdgeInsets.all(20.0),
child: const Text("To Fetch Data")
),
),
],
),
);
}
}

19
lib/main.dart Normal file
View File

@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:witl/home_screen.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Entry Point",
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomeScreen(),
);
}
}

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 520 B

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Some files were not shown because too many files have changed in this diff Show More