ZontreckWebsite/lib/pages/Main.dart
2024-05-15 15:54:13 -07:00

86 lines
2.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:footer/footer.dart';
import 'package:footer/footer_view.dart';
import 'package:zontreck/Constants.dart';
import 'package:zontreck/pages/OpenSim.dart';
class MainPage extends StatelessWidget {
const MainPage({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
routes: {
"/": (context) => const HomePage(),
"/opensim": (context) => const OpenSimPage()
},
theme: ThemeData.dark(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
HomePageState createState() => HomePageState();
}
class HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Constants.TITLEBAR_COLOR,
title: const Text("Zontreck.com"),
),
body: FooterView(
footer: Footer(
alignment: Alignment.center,
backgroundColor: ThemeData.dark().focusColor,
child: const Text("${Constants.COPYRIGHT}\n${Constants.VERSION}")),
children: const [
Column(
children: [
Center(
child: ListTile(
title: Text(
"Zontreck.com is owned by, and operated by, Tara Piccari")),
),
ListTile(
title: Text(
"This site acts as both my portfolio, and as a portal to various different parts of my server"),
),
Text("Thank you for visiting"),
],
),
],
),
drawer: Drawer(
elevation: 8,
backgroundColor: Constants.DRAWER_COLOR,
child: Column(
children: [
const DrawerHeader(
child: Column(
children: [
Text("Zontreck.com"),
Text(""),
Text("Copyright 2024"),
Text("Tara Piccari")
],
)),
ListTile(
title: const Text("O P E N S I M"),
leading: const Icon(Icons.front_hand_outlined),
subtitle: const Text("OpenSim management interface for private grid"),
onTap: () {
Navigator.pushNamed(context, "/opensim");
},
)
],
),
),
);
}
}