Fix typo in constant names

This commit is contained in:
zontreck 2024-05-15 19:52:12 -07:00
parent 486318acac
commit f37af74687
6 changed files with 145 additions and 4 deletions

View file

@ -6,6 +6,7 @@ import 'package:zontreck/Settings.dart';
class Constants { class Constants {
static const TITLEBAR_COLOR = Color.fromARGB(255, 97, 0, 0); static const TITLEBAR_COLOR = Color.fromARGB(255, 97, 0, 0);
static const DRAWER_COLOR = Color.fromARGB(148, 0, 97, 97); static const DRAWER_COLOR = Color.fromARGB(148, 0, 97, 97);
static const PORTFOLIO_CARD_COLOR = Color.fromARGB(255, 0, 71, 97);
static const VERSION = "1.0.051524.1622"; static const VERSION = "1.0.051524.1622";
static const COPYRIGHT = "Copyright 2024 - Tara Piccari. All rights Reserved"; static const COPYRIGHT = "Copyright 2024 - Tara Piccari. All rights Reserved";

View file

@ -3,6 +3,7 @@ import 'package:footer/footer.dart';
import 'package:footer/footer_view.dart'; import 'package:footer/footer_view.dart';
import 'package:zontreck/Constants.dart'; import 'package:zontreck/Constants.dart';
import 'package:zontreck/pages/OpenSim.dart'; import 'package:zontreck/pages/OpenSim.dart';
import 'package:zontreck/pages/Portfolio.dart';
class MainPage extends StatelessWidget { class MainPage extends StatelessWidget {
const MainPage({super.key}); const MainPage({super.key});
@ -12,7 +13,9 @@ class MainPage extends StatelessWidget {
return MaterialApp( return MaterialApp(
routes: { routes: {
"/": (context) => const HomePage(), "/": (context) => const HomePage(),
"/opensim": (context) => const OpenSimPage() "/opensim": (context) => const OpenSimPage(),
"/portfolio": (context) => PortfolioPage(),
"/portfolio/coun": (context) => CardsOfUtterNonsense()
}, },
theme: ThemeData.dark(), theme: ThemeData.dark(),
); );
@ -73,10 +76,19 @@ class HomePageState extends State<HomePage> {
ListTile( ListTile(
title: const Text("O P E N S I M"), title: const Text("O P E N S I M"),
leading: const Icon(Icons.front_hand_outlined), leading: const Icon(Icons.front_hand_outlined),
subtitle: const Text("OpenSim management interface for private grid"), subtitle:
const Text("OpenSim management interface for private grid"),
onTap: () { onTap: () {
Navigator.pushNamed(context, "/opensim"); Navigator.pushNamed(context, "/opensim");
}, },
),
ListTile(
title: Text("P O R T F O L I O"),
subtitle: Text("View my work"),
leading: Icon(Icons.book_online),
onTap: () {
Navigator.pushNamed(context, "/portfolio");
},
) )
], ],
), ),

97
lib/pages/Portfolio.dart Normal file
View file

@ -0,0 +1,97 @@
import 'package:flutter/material.dart';
import 'package:zontreck/Constants.dart';
class PortfolioPage extends StatelessWidget {
PortfolioPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Zontreck.com - Portfolio of Tara Piccari"),
backgroundColor: Constants.TITLEBAR_COLOR,
),
body: Padding(
padding: EdgeInsets.all(8),
child: SingleChildScrollView(
child: Row(
children: [
PortfolioEntry(
title: ListTile(title: Text("Cards of Utter Nonsense")),
body: Text(
"A product I created for Second Life, but may port to the mobile phone at some point"),
onTap: () {
Navigator.pushNamed(context, "/portfolio/coun");
},
),
PortfolioEntry(
title: Text("Zontreck.com"),
body: Text(
("This website, which is written entirely in Flutter, with some supporting API files in PHP")),
onTap: () {})
],
),
),
),
);
}
}
class PortfolioEntry extends StatelessWidget {
final Widget title;
final Widget body;
final Function() onTap;
PortfolioEntry(
{required this.title, required this.body, required this.onTap});
@override
Widget build(BuildContext context) {
return Card(
color: Constants.PORTFOLIO_CARD_COLOR,
elevation: 8,
child: InkWell(
onTap: onTap,
child: Padding(
padding: EdgeInsets.all(8),
child: SizedBox(
width: 225,
height: 325,
child: Column(
children: [
title,
Divider(
thickness: 4,
),
body
],
),
),
),
),
);
}
}
class CardsOfUtterNonsense extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Portfolio Entry - Cards of Utter Nonsense"),
backgroundColor: Constants.TITLEBAR_COLOR,
),
body: Padding(
padding: EdgeInsets.all(8),
child: SingleChildScrollView(
child: Column(
children: [
Text(
"Cards of Utter Nonsense is primarily written in Linden Scripting Language (LSL). It depends upon a MariaDB backend and PHP. The game uses a Heads Up Display (HUD), which is written in Flutter/Dart.")
],
),
),
),
);
}
}

View file

@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:zontreck/Constants.dart';
class RegisterAccountPage extends StatefulWidget {
RegisterAccountPage({super.key});
@override
RegisterAccountState createState() => RegisterAccountState();
}
class RegisterAccountState extends State<RegisterAccountPage> {
RegisterAccountState();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("OpenSim - Register Account"),
backgroundColor: Constants.TITLEBAR_COLOR,
),
body: Padding(
padding: EdgeInsets.all(8),
child: SingleChildScrollView(
child: Column(
children: [],
),
),
),
);
}
}

View file

@ -3,7 +3,7 @@ if(defined("COMMON")) return;
define("COMMON", 1); define("COMMON", 1);
function get_DB() { function get_DB() {
return mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME); return mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
} }

View file

@ -35,4 +35,4 @@
<body> <body>
<script src="flutter_bootstrap.js" async></script> <script src="flutter_bootstrap.js" async></script>
</body> </body>
</html> </html>