Updated license tile and adjusted settings tile accordingly
All checks were successful
Pull Request Pipeline / lint (pull_request) Successful in 2m37s
Pull Request Pipeline / test (pull_request) Successful in 2m36s

This commit is contained in:
2026-01-11 16:33:56 +01:00
parent 9248284292
commit d7f08c5f50
6 changed files with 131 additions and 41 deletions

View File

@@ -22,30 +22,54 @@ class LicenseDetailView extends StatelessWidget {
Center( Center(
child: Column( child: Column(
children: [ children: [
Text( Row(
package.name, mainAxisAlignment: MainAxisAlignment.center,
textAlign: TextAlign.center,
style: const TextStyle( children: [
fontSize: 24, Container(
fontWeight: FontWeight.bold, margin: const EdgeInsetsGeometry.only(right: 15),
), width: 60,
height: 60,
decoration: BoxDecoration(
color: CustomTheme.primaryColor.withAlpha(40),
borderRadius: BorderRadius.circular(10),
),
child: Icon(
Icons.description,
color: CustomTheme.primaryColor,
size: 30,
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
package.name,
textAlign: TextAlign.left,
style: const TextStyle(
height: 0,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
if (package.version != null) ...[
Text(
'Version ${package.version}',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 14,
color: Colors.grey.shade300,
),
),
],
],
),
],
), ),
if (package.version != null) ...[
const SizedBox(height: 8),
Text(
'Version ${package.version}',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14,
color: Colors.grey.shade300,
fontWeight: FontWeight.bold,
),
),
],
if (package.authors.isNotEmpty) ...[ if (package.authors.isNotEmpty) ...[
const SizedBox(height: 8), const SizedBox(height: 8),
Text( SelectableText(
package.authors.join(', '), package.authors.join(', '),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
@@ -57,7 +81,7 @@ class LicenseDetailView extends StatelessWidget {
if (package.homepage != null && if (package.homepage != null &&
package.homepage!.isNotEmpty) ...[ package.homepage!.isNotEmpty) ...[
const SizedBox(height: 4), const SizedBox(height: 4),
Text( SelectableText(
package.homepage!, package.homepage!,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(

View File

@@ -22,7 +22,7 @@ class LicensesView extends StatelessWidget {
itemBuilder: (context, index) { itemBuilder: (context, index) {
final package = allDependencies[index]; final package = allDependencies[index];
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 12), padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
child: LicenseTile(package: package), child: LicenseTile(package: package),
); );
}, },

View File

@@ -45,7 +45,7 @@ class _SettingsViewState extends State<SettingsView> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.fromLTRB(24, 0, 24, 10), padding: const EdgeInsets.only(left: 16, bottom: 10),
child: Text( child: Text(
textAlign: TextAlign.start, textAlign: TextAlign.start,
loc.menu, loc.menu,
@@ -56,7 +56,7 @@ class _SettingsViewState extends State<SettingsView> {
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 10), padding: const EdgeInsets.only(left: 16, top: 10, bottom: 10),
child: Text( child: Text(
textAlign: TextAlign.start, textAlign: TextAlign.start,
loc.settings, loc.settings,
@@ -68,7 +68,7 @@ class _SettingsViewState extends State<SettingsView> {
), ),
SettingsListTile( SettingsListTile(
title: loc.export_data, title: loc.export_data,
icon: Icons.upload_rounded, icon: Icons.upload,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16), suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
onPressed: () async { onPressed: () async {
final String json = await DataTransferService.getAppDataAsJson( final String json = await DataTransferService.getAppDataAsJson(
@@ -84,7 +84,7 @@ class _SettingsViewState extends State<SettingsView> {
), ),
SettingsListTile( SettingsListTile(
title: loc.import_data, title: loc.import_data,
icon: Icons.download_rounded, icon: Icons.download,
suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16), suffixWidget: const Icon(Icons.arrow_forward_ios, size: 16),
onPressed: () async { onPressed: () async {
final result = await DataTransferService.importData(context); final result = await DataTransferService.importData(context);
@@ -94,7 +94,7 @@ class _SettingsViewState extends State<SettingsView> {
), ),
SettingsListTile( SettingsListTile(
title: loc.delete_all_data, title: loc.delete_all_data,
icon: Icons.delete_rounded, 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>(
@@ -127,7 +127,7 @@ class _SettingsViewState extends State<SettingsView> {
}, },
), ),
const Padding( const Padding(
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 10), padding: EdgeInsets.only(left: 16, top: 10, bottom: 10),
child: Text( child: Text(
textAlign: TextAlign.start, textAlign: TextAlign.start,
'App', 'App',

View File

@@ -19,32 +19,85 @@ class LicenseTile extends StatelessWidget {
); );
}, },
child: Container( child: Container(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12), margin: const EdgeInsets.only(bottom: 8),
decoration: CustomTheme.standardBoxDecoration, padding: const EdgeInsets.all(16),
decoration: CustomTheme.standardBoxDecoration.copyWith(
borderRadius: BorderRadius.circular(12),
),
child: Row( child: Row(
children: [ children: [
Container(
width: 48,
height: 48,
decoration: BoxDecoration(
color: CustomTheme.primaryColor.withAlpha(40),
borderRadius: BorderRadius.circular(10),
),
child: Icon(
Icons.description,
color: CustomTheme.primaryColor,
size: 24,
),
),
const SizedBox(width: 16),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Row(
package.name, children: [
style: const TextStyle( Flexible(
fontSize: 16, child: Text(
fontWeight: FontWeight.w600, package.name,
), overflow: TextOverflow.ellipsis,
maxLines: 1,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
),
if (package.version != null &&
package.version!.isNotEmpty) ...[
const SizedBox(width: 12),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 2,
),
decoration: BoxDecoration(
color: CustomTheme.onBoxColor,
borderRadius: BorderRadius.circular(6),
),
child: Text(
'v${package.version}',
style: TextStyle(
fontSize: 11,
color: Colors.grey.shade500,
fontWeight: FontWeight.w500,
),
),
),
],
],
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
package.description, package.description,
maxLines: 1, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, color: Colors.grey.shade400), style: TextStyle(
fontSize: 13,
color: Colors.grey.shade400,
height: 1.3,
),
), ),
], ],
), ),
), ),
const Icon(Icons.arrow_forward_ios, size: 16), const SizedBox(width: 12),
// Arrow Icon
Icon(Icons.chevron_right, color: Colors.grey.shade600, size: 24),
], ],
), ),
), ),

View File

@@ -47,13 +47,26 @@ class SettingsListTile extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Container(
width: 48,
height: 48,
decoration: BoxDecoration(
color: CustomTheme.primaryColor.withAlpha(40),
borderRadius: BorderRadius.circular(10),
),
child: Icon(
icon,
size: 28,
color: CustomTheme.primaryColor.withGreen(40),
),
),
/* Container(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: CustomTheme.primaryColor, color: CustomTheme.primaryColor,
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
child: Icon(icon, size: 24), 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.4+122 version: 0.0.5+127
environment: environment:
sdk: ^3.8.1 sdk: ^3.8.1