94 lines
2.7 KiB
Dart
94 lines
2.7 KiB
Dart
// Flutter
|
|
import 'package:flutter/material.dart';
|
|
import 'package:url_launcher/url_launcher_string.dart';
|
|
|
|
_launchSite(String url) async {
|
|
try {
|
|
if (await canLaunchUrlString(url)) {
|
|
await launchUrlString(
|
|
url,
|
|
mode: LaunchMode.externalApplication,
|
|
);
|
|
} else {
|
|
throw "System does not think it can launch '$url'.";
|
|
}
|
|
} on Exception catch (e) {
|
|
throw e.toString();
|
|
}
|
|
}
|
|
|
|
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: () {
|
|
_launchSite("https://git.hyperling.com/me");
|
|
},
|
|
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: () {
|
|
_launchSite("https://hyperling.com");
|
|
},
|
|
icon: Icon(Icons.web_asset),
|
|
label: Text("Personal Website"),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|