5 Commits

Author SHA1 Message Date
f0c6dd8401 Adjusted container size and padding
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m9s
Pull Request Pipeline / lint (pull_request) Successful in 2m17s
2026-01-12 16:20:36 +01:00
7bdad57cc8 Removed old code 2026-01-12 16:18:13 +01:00
5da1b6eecb Removed expanded widget 2026-01-12 16:17:18 +01:00
cdafd4bb6f Made links clickable 2026-01-12 16:16:59 +01:00
6aee055df2 Removed whitespace 2026-01-12 16:04:37 +01:00
4 changed files with 193 additions and 195 deletions

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:game_tracker/core/custom_theme.dart'; import 'package:game_tracker/core/custom_theme.dart';
import 'package:game_tracker/l10n/generated/app_localizations.dart'; import 'package:game_tracker/l10n/generated/app_localizations.dart';
import 'package:game_tracker/presentation/views/main_menu/settings_view/licenses/oss_licenses.dart'; import 'package:game_tracker/presentation/views/main_menu/settings_view/licenses/oss_licenses.dart';
import 'package:url_launcher/url_launcher.dart';
class LicenseDetailView extends StatelessWidget { class LicenseDetailView extends StatelessWidget {
final Package package; final Package package;
@@ -24,7 +25,6 @@ class LicenseDetailView extends StatelessWidget {
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Container( Container(
margin: const EdgeInsetsGeometry.only(right: 15), margin: const EdgeInsetsGeometry.only(right: 15),
@@ -81,12 +81,22 @@ class LicenseDetailView extends StatelessWidget {
if (package.homepage != null && if (package.homepage != null &&
package.homepage!.isNotEmpty) ...[ package.homepage!.isNotEmpty) ...[
const SizedBox(height: 8), const SizedBox(height: 8),
SelectableText( GestureDetector(
package.homepage!, onTap: () async {
textAlign: TextAlign.center, final uri = Uri.parse(package.homepage!);
style: TextStyle( if (await canLaunchUrl(uri)) {
fontSize: 12, launchUrl(uri);
color: Colors.grey.shade500, }
},
child: Text(
package.homepage!,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 12,
color: CustomTheme.secondaryColor,
decoration: TextDecoration.underline,
decorationColor: CustomTheme.secondaryColor,
),
), ),
), ),
], ],

View File

@@ -41,192 +41,188 @@ class _SettingsViewState extends State<SettingsView> {
appBar: AppBar(backgroundColor: CustomTheme.backgroundColor), appBar: AppBar(backgroundColor: CustomTheme.backgroundColor),
backgroundColor: CustomTheme.backgroundColor, backgroundColor: CustomTheme.backgroundColor,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Expanded( child: Column(
child: Column( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Padding(
Padding( padding: const EdgeInsets.only(left: 16, bottom: 10),
padding: const EdgeInsets.only(left: 16, bottom: 10), child: Text(
child: Text( textAlign: TextAlign.start,
textAlign: TextAlign.start, loc.settings,
loc.settings, style: const TextStyle(
style: const TextStyle( fontSize: 28,
fontSize: 28, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold,
),
), ),
), ),
Padding( ),
padding: const EdgeInsets.only(left: 16, top: 10, bottom: 10), Padding(
child: Text( padding: const EdgeInsets.only(left: 16, top: 10, bottom: 10),
textAlign: TextAlign.start, child: Text(
loc.data, textAlign: TextAlign.start,
style: const TextStyle( loc.data,
fontSize: 22, style: const TextStyle(
fontWeight: FontWeight.bold, fontSize: 22,
), fontWeight: FontWeight.bold,
), ),
), ),
SettingsListTile( ),
title: loc.export_data, SettingsListTile(
icon: Icons.upload, title: loc.export_data,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16), icon: Icons.upload,
onPressed: () async { suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
final String json = onPressed: () async {
await DataTransferService.getAppDataAsJson(context); final String json =
final result = await DataTransferService.exportData( await DataTransferService.getAppDataAsJson(context);
json, final result = await DataTransferService.exportData(
'game_tracker-data', json,
); 'game_tracker-data',
if (!context.mounted) return; );
showExportSnackBar(context: context, result: result); if (!context.mounted) return;
}, showExportSnackBar(context: context, result: result);
), },
SettingsListTile( ),
title: loc.import_data, SettingsListTile(
icon: Icons.download, title: loc.import_data,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16), icon: Icons.download,
onPressed: () async { suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
final result = await DataTransferService.importData( onPressed: () async {
context, final result = await DataTransferService.importData(context);
); if (!context.mounted) return;
if (!context.mounted) return; showImportSnackBar(context: context, result: result);
showImportSnackBar(context: context, result: result); },
}, ),
), SettingsListTile(
SettingsListTile( title: loc.delete_all_data,
title: loc.delete_all_data, icon: Icons.delete,
icon: Icons.delete, suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16), onPressed: () {
onPressed: () { showDialog<bool>(
showDialog<bool>( context: context,
context: context, builder: (context) => AlertDialog(
builder: (context) => AlertDialog( title: Text('${loc.delete_all_data}?'),
title: Text('${loc.delete_all_data}?'), content: Text(loc.this_cannot_be_undone),
content: Text(loc.this_cannot_be_undone), actions: [
actions: [ TextButton(
TextButton( onPressed: () => Navigator.of(context).pop(false),
onPressed: () => Navigator.of(context).pop(false), child: Text(loc.cancel),
child: Text(loc.cancel),
),
TextButton(
onPressed: () => Navigator.of(context).pop(true),
child: Text(loc.delete),
),
],
),
).then((confirmed) {
if (confirmed == true && context.mounted) {
DataTransferService.deleteAllData(context);
showSnackbar(
context: context,
message: AppLocalizations.of(
context,
).data_successfully_deleted,
);
}
});
},
),
Padding(
padding: const EdgeInsets.only(left: 16, top: 10, bottom: 10),
child: Text(
textAlign: TextAlign.start,
loc.legal,
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
),
),
),
SettingsListTile(
title: loc.licenses,
icon: Icons.insert_drive_file,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => const LicensesView(),
),
);
},
),
SettingsListTile(
title: loc.legal_notice,
icon: Icons.account_balance_sharp,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
onPressed: null,
),
SettingsListTile(
title: loc.privacy_policy,
icon: Icons.gpp_good_rounded,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
onPressed: null,
),
Padding(
padding: const EdgeInsets.only(top: 30, bottom: 20),
child: Center(
child: Column(
spacing: 4,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 40,
children: [
GestureDetector(
child: const Icon(Icons.language),
onTap: () => {
launchUrl(Uri.parse('https://liquid-dev.de')),
},
),
GestureDetector(
child: const FaIcon(FontAwesomeIcons.github),
onTap: () => {
launchUrl(
Uri.parse(
'https://github.com/liquiddevelopmentde',
),
),
},
),
GestureDetector(
child: Icon(
Platform.isIOS
? CupertinoIcons.mail_solid
: Icons.email,
),
onTap: () => launchUrl(
Uri.parse('mailto:hi@liquid-dev.de'),
),
),
],
),
), ),
Text( TextButton(
'© ${DateFormat('yyyy').format(DateTime.now())} Liquid Development', onPressed: () => Navigator.of(context).pop(true),
style: TextStyle( child: Text(loc.delete),
color: Colors.grey.shade600,
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
Text(
'Version ${_packageInfo.version} (${_packageInfo.buildNumber})',
style: TextStyle(
color: Colors.grey.shade600,
fontSize: 14,
fontWeight: FontWeight.w600,
),
), ),
], ],
), ),
).then((confirmed) {
if (confirmed == true && context.mounted) {
DataTransferService.deleteAllData(context);
showSnackbar(
context: context,
message: AppLocalizations.of(
context,
).data_successfully_deleted,
);
}
});
},
),
Padding(
padding: const EdgeInsets.only(left: 16, top: 10, bottom: 10),
child: Text(
textAlign: TextAlign.start,
loc.legal,
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
), ),
), ),
], ),
), SettingsListTile(
title: loc.licenses,
icon: Icons.insert_drive_file,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => const LicensesView(),
),
);
},
),
SettingsListTile(
title: loc.legal_notice,
icon: Icons.account_balance_sharp,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
onPressed: null,
),
SettingsListTile(
title: loc.privacy_policy,
icon: Icons.gpp_good_rounded,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
onPressed: null,
),
Padding(
padding: const EdgeInsets.only(top: 30, bottom: 20),
child: Center(
child: Column(
spacing: 4,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 40,
children: [
GestureDetector(
child: const Icon(Icons.language),
onTap: () => {
launchUrl(Uri.parse('https://liquid-dev.de')),
},
),
GestureDetector(
child: const FaIcon(FontAwesomeIcons.github),
onTap: () => {
launchUrl(
Uri.parse(
'https://github.com/liquiddevelopmentde',
),
),
},
),
GestureDetector(
child: Icon(
Platform.isIOS
? CupertinoIcons.mail_solid
: Icons.email,
),
onTap: () => launchUrl(
Uri.parse('mailto:hi@liquid-dev.de'),
),
),
],
),
),
Text(
'© ${DateFormat('yyyy').format(DateTime.now())} Liquid Development',
style: TextStyle(
color: Colors.grey.shade600,
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
Text(
'Version ${_packageInfo.version} (${_packageInfo.buildNumber})',
style: TextStyle(
color: Colors.grey.shade600,
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
],
),
),
),
],
), ),
), ),
), ),

View File

@@ -38,7 +38,7 @@ class SettingsListTile extends StatelessWidget {
onTap: onPressed ?? () {}, onTap: onPressed ?? () {},
child: Container( child: Container(
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 14), padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
decoration: CustomTheme.standardBoxDecoration, decoration: CustomTheme.standardBoxDecoration,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -47,8 +47,8 @@ class SettingsListTile extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Container(
width: 48, width: 44,
height: 48, height: 44,
decoration: BoxDecoration( decoration: BoxDecoration(
color: CustomTheme.primaryColor.withAlpha(40), color: CustomTheme.primaryColor.withAlpha(40),
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
@@ -59,14 +59,6 @@ class SettingsListTile extends StatelessWidget {
color: CustomTheme.primaryColor.withGreen(40), color: CustomTheme.primaryColor.withGreen(40),
), ),
), ),
/* Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: CustomTheme.primaryColor,
shape: BoxShape.circle,
),
child: Icon(icon, size: 24),
),*/
const SizedBox(width: 16), const SizedBox(width: 16),
Text(title, style: const TextStyle(fontSize: 18)), Text(title, style: const TextStyle(fontSize: 18)),
], ],

View File

@@ -1,7 +1,7 @@
name: game_tracker name: game_tracker
description: "Game Tracking App for Card Games" description: "Game Tracking App for Card Games"
publish_to: 'none' publish_to: 'none'
version: 0.0.5+132 version: 0.0.5+137
environment: environment:
sdk: ^3.8.1 sdk: ^3.8.1