Add a Help page.
This commit is contained in:
parent
305012ffd4
commit
5425b22ba2
@ -7,6 +7,7 @@ import '/pages/income.dart';
|
|||||||
import '/pages/asset.dart';
|
import '/pages/asset.dart';
|
||||||
import '/pages/report.dart';
|
import '/pages/report.dart';
|
||||||
import '/pages/settings.dart';
|
import '/pages/settings.dart';
|
||||||
|
import '/pages/help.dart';
|
||||||
import '/db.dart';
|
import '/db.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
@ -70,6 +71,8 @@ class _HomePageState extends State<HomePage> {
|
|||||||
page = ProjectionPage();
|
page = ProjectionPage();
|
||||||
case 4:
|
case 4:
|
||||||
page = SettingsPage();
|
page = SettingsPage();
|
||||||
|
case 5:
|
||||||
|
page = HelpPage();
|
||||||
default:
|
default:
|
||||||
throw UnimplementedError('No widget for page $pageSelected yet!');
|
throw UnimplementedError('No widget for page $pageSelected yet!');
|
||||||
}
|
}
|
||||||
@ -118,6 +121,10 @@ class _HomePageState extends State<HomePage> {
|
|||||||
icon: Icon(Icons.settings),
|
icon: Icon(Icons.settings),
|
||||||
label: Text('Settings'),
|
label: Text('Settings'),
|
||||||
),
|
),
|
||||||
|
NavigationRailDestination(
|
||||||
|
icon: Icon(Icons.help),
|
||||||
|
label: Text('Help'),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
selectedIndex: pageSelected,
|
selectedIndex: pageSelected,
|
||||||
onDestinationSelected: (value) {
|
onDestinationSelected: (value) {
|
||||||
|
72
lib/pages/help.dart
Normal file
72
lib/pages/help.dart
Normal 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"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user