104 lines
2.8 KiB
Dart
104 lines
2.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:witl/fetcher.dart';
|
|
import 'package:witl/input_data.dart';
|
|
import 'package:witl/app_settings.dart';
|
|
|
|
class HomeScreen extends StatelessWidget {
|
|
const HomeScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
// Hamburbur menu
|
|
IconButton(
|
|
onPressed: () {
|
|
|
|
},
|
|
icon: const Icon(Icons.menu_sharp)
|
|
),
|
|
|
|
// Space
|
|
// const SizedBox(width: 30,),
|
|
|
|
// Our Amazing Logo
|
|
// Image.asset('assets/images/choo.png',
|
|
// fit: BoxFit.contain,
|
|
// height: 64,
|
|
// ),
|
|
|
|
// Spacing
|
|
// const SizedBox(width: 10,),
|
|
|
|
const Expanded(child: SizedBox()),
|
|
|
|
// App Title
|
|
const Text("WITL"),
|
|
|
|
// Fill out the area blankly
|
|
// So that the icon can be shoved far right
|
|
const Expanded(child: SizedBox(),),
|
|
|
|
// Navigate to Settings
|
|
IconButton(
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(builder: (context) => const Settings())
|
|
);
|
|
},
|
|
icon: const Icon(Icons.settings)),
|
|
]
|
|
),
|
|
),
|
|
body: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
const Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children:[
|
|
// Our Motto (?)
|
|
Text("We may not be able to tell you why.\nBut surely are able to predict when."),
|
|
],
|
|
),
|
|
|
|
// Spacing
|
|
const SizedBox(height: 80),
|
|
|
|
// To the fetching screen
|
|
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: 30),
|
|
|
|
// To Data Input
|
|
InkWell(
|
|
onTap:() {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(builder: (context) => const InputData())
|
|
);
|
|
},
|
|
child: Container(
|
|
padding: const EdgeInsets.all(20.0),
|
|
child: const Text("To Input Data")
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
} |