Removed expanded widget
This commit is contained in:
@@ -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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user