Add initial pages
This commit is contained in:
parent
927e2c70c0
commit
e73edafc99
4 changed files with 109 additions and 1 deletions
6
lib/Constants.dart
Normal file
6
lib/Constants.dart
Normal file
|
@ -0,0 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class Constants {
|
||||
static const TITLEBAR_COLOR = Color.fromARGB(255, 97, 0, 0);
|
||||
static const DRAWER_COLOR = Color.fromARGB(148, 0, 97, 97);
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:zontreck/pages/Main.dart';
|
||||
|
||||
void main() {
|
||||
runApp();
|
||||
runApp(new MainPage());
|
||||
}
|
||||
|
|
80
lib/pages/Main.dart
Normal file
80
lib/pages/Main.dart
Normal file
|
@ -0,0 +1,80 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:zontreck/Constants.dart';
|
||||
import 'package:zontreck/pages/OpenSim.dart';
|
||||
|
||||
class MainPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
routes: {
|
||||
"/": (context) => HomePage(),
|
||||
"/opensim": (context) => OpenSimPage()
|
||||
},
|
||||
theme: ThemeData.dark(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
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: Text("Zontreck.com"),
|
||||
),
|
||||
body: 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"),
|
||||
SizedBox(
|
||||
height: 80,
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Site build: 1.0.051524.0338"),
|
||||
)
|
||||
],
|
||||
),
|
||||
drawer: Drawer(
|
||||
elevation: 8,
|
||||
backgroundColor: Constants.DRAWER_COLOR,
|
||||
child: Column(
|
||||
children: [
|
||||
DrawerHeader(
|
||||
child: Column(
|
||||
children: [
|
||||
Text("Zontreck.com"),
|
||||
Text(""),
|
||||
Text("Copyright 2024"),
|
||||
Text("Tara Piccari")
|
||||
],
|
||||
)),
|
||||
ListTile(
|
||||
title: Text("O P E N S I M"),
|
||||
leading: Icon(Icons.front_hand_outlined),
|
||||
subtitle: Text("OpenSim management interface for private grid"),
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, "/opensim");
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
21
lib/pages/OpenSim.dart
Normal file
21
lib/pages/OpenSim.dart
Normal file
|
@ -0,0 +1,21 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:zontreck/Constants.dart';
|
||||
|
||||
class OpenSimPage extends StatefulWidget {
|
||||
OpenSimPage({super.key});
|
||||
|
||||
@override
|
||||
OpenSimPageState createState() => OpenSimPageState();
|
||||
}
|
||||
|
||||
class OpenSimPageState extends State<OpenSimPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Constants.TITLEBAR_COLOR,
|
||||
title: Text("Zontreck.com - OpenSim Manager"),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue