Add a Help page.

This commit is contained in:
Hyperling 2025-02-07 10:53:29 -07:00
parent 305012ffd4
commit 5425b22ba2
2 changed files with 79 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import '/pages/income.dart';
import '/pages/asset.dart';
import '/pages/report.dart';
import '/pages/settings.dart';
import '/pages/help.dart';
import '/db.dart';
void main() {
@ -70,6 +71,8 @@ class _HomePageState extends State<HomePage> {
page = ProjectionPage();
case 4:
page = SettingsPage();
case 5:
page = HelpPage();
default:
throw UnimplementedError('No widget for page $pageSelected yet!');
}
@ -118,6 +121,10 @@ class _HomePageState extends State<HomePage> {
icon: Icon(Icons.settings),
label: Text('Settings'),
),
NavigationRailDestination(
icon: Icon(Icons.help),
label: Text('Help'),
),
],
selectedIndex: pageSelected,
onDestinationSelected: (value) {

72
lib/pages/help.dart Normal file
View File

@ -0,0 +1,72 @@
import 'package:flutter/material.dart';
class HelpPage extends StatelessWidget {
const HelpPage({
super.key,
});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: theme.colorScheme.onPrimary,
),
child: Column(
children: [
Text("This app is meant to be a simple budgeting tool,"
" allowing you to view your income and expenses at a high level"
" without micro managing specific budget items or adding receipts."),
//Text("Another paragraph.")
],
),
),
),
),
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: theme.colorScheme.onPrimary,
),
child: TextButton.icon(
onPressed: () {},
icon: Icon(Icons.code),
label: Text("Code Repository"),
),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: theme.colorScheme.onPrimary,
),
child: TextButton.icon(
onPressed: () {},
icon: Icon(Icons.web_asset),
label: Text("Personal Website"),
),
),
),
),
],
)
],
);
}
}