Added OSS license dialog
This commit is contained in:
parent
b22af349a1
commit
c872e40861
|
@ -1,3 +1,3 @@
|
|||
// lib/globals.dart
|
||||
//const String apiurl = "https://api.dthpp.mercurio.moe";
|
||||
const String apiurl = "http://10.0.0.10:9134";
|
||||
const String apiurl = "https://api.dthpp.mercurio.moe";
|
||||
//const String apiurl = "http://10.0.0.10:9134";
|
||||
|
|
|
@ -40,12 +40,38 @@ class _HomePageState extends State<HomePage> {
|
|||
);
|
||||
}
|
||||
|
||||
Future<void> _showOpenSourceLicenses() async {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) => AboutDialog(
|
||||
applicationIcon: const Icon(Icons.code),
|
||||
applicationLegalese: '© 2024 Thomas Bassi @ Defence Tech.',
|
||||
applicationName: 'DTHPP',
|
||||
applicationVersion: '#B22AF349A1',
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16.0),
|
||||
child: Text(
|
||||
"Do people even care about licenses? Is this ever going to be opened? Anywho, i hope you're enjoying the app and having fun on your break :D",
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Ping Pong Tracker'),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.info),
|
||||
onPressed: _showOpenSourceLicenses,
|
||||
tooltip: 'Open Source Licenses',
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.logout),
|
||||
onPressed: () => _logout(context),
|
||||
|
|
|
@ -5,8 +5,10 @@
|
|||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import package_info
|
||||
import shared_preferences_foundation
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ dependencies:
|
|||
shared_preferences: ^2.3.3
|
||||
http: ^1.2.2
|
||||
logger: ^2.5.0
|
||||
package_info: ^2.0.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
Loading…
Reference in a new issue