Used new custom form row
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
import 'package:cabo_counter/l10n/app_localizations.dart';
|
import 'package:cabo_counter/l10n/app_localizations.dart';
|
||||||
|
import 'package:cabo_counter/presentation/widgets/custom_form_row.dart';
|
||||||
import 'package:cabo_counter/presentation/widgets/stepper.dart';
|
import 'package:cabo_counter/presentation/widgets/stepper.dart';
|
||||||
import 'package:cabo_counter/services/config_service.dart';
|
import 'package:cabo_counter/services/config_service.dart';
|
||||||
import 'package:cabo_counter/services/local_storage_service.dart';
|
import 'package:cabo_counter/services/local_storage_service.dart';
|
||||||
import 'package:cabo_counter/utility/custom_theme.dart';
|
import 'package:cabo_counter/utility/custom_theme.dart';
|
||||||
import 'package:cabo_counter/utility/globals.dart';
|
import 'package:cabo_counter/utility/globals.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
@@ -107,97 +109,31 @@ class _SettingsViewState extends State<SettingsView> {
|
|||||||
style: CustomTheme.rowTitle,
|
style: CustomTheme.rowTitle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
/*Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 30),
|
|
||||||
child: Center(
|
|
||||||
heightFactor: 1,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
CupertinoButton(
|
|
||||||
color: CustomTheme.primaryColor,
|
|
||||||
sizeStyle: CupertinoButtonSize.medium,
|
|
||||||
child: Text(
|
|
||||||
AppLocalizations.of(context).import_data,
|
|
||||||
style:
|
|
||||||
TextStyle(color: CustomTheme.backgroundColor),
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
|
||||||
final success =
|
|
||||||
await LocalStorageService.importJsonFile();
|
|
||||||
showFeedbackDialog(success);
|
|
||||||
}),
|
|
||||||
const SizedBox(
|
|
||||||
width: 20,
|
|
||||||
),
|
|
||||||
CupertinoButton(
|
|
||||||
color: CustomTheme.primaryColor,
|
|
||||||
sizeStyle: CupertinoButtonSize.medium,
|
|
||||||
child: Text(
|
|
||||||
AppLocalizations.of(context).export_data,
|
|
||||||
style:
|
|
||||||
TextStyle(color: CustomTheme.backgroundColor),
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
|
||||||
final success =
|
|
||||||
await LocalStorageService.exportGameData();
|
|
||||||
if (!success && context.mounted) {
|
|
||||||
showCupertinoDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) => CupertinoAlertDialog(
|
|
||||||
title: Text(AppLocalizations.of(context)
|
|
||||||
.export_error_title),
|
|
||||||
content: Text(AppLocalizations.of(context)
|
|
||||||
.export_error_message),
|
|
||||||
actions: [
|
|
||||||
CupertinoDialogAction(
|
|
||||||
child:
|
|
||||||
Text(AppLocalizations.of(context).ok),
|
|
||||||
onPressed: () => Navigator.pop(context),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
),*/
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(10, 15, 10, 0),
|
padding: const EdgeInsets.fromLTRB(10, 15, 10, 0),
|
||||||
child: CupertinoFormSection.insetGrouped(
|
child: CupertinoFormSection.insetGrouped(
|
||||||
backgroundColor: CustomTheme.backgroundColor,
|
backgroundColor: CustomTheme.backgroundColor,
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
children: [
|
children: [
|
||||||
CupertinoFormRow(
|
CustomFormRow(
|
||||||
prefix: Row(
|
prefixText: 'Spieldaten importieren',
|
||||||
children: [
|
prefixIcon: CupertinoIcons.square_arrow_down,
|
||||||
Icon(
|
onTap: () {},
|
||||||
CupertinoIcons.square_arrow_up,
|
suffixWidget: CupertinoListTileChevron(),
|
||||||
color: CustomTheme.primaryColor,
|
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
CustomFormRow(
|
||||||
const Text('Spieldaten exportieren'),
|
prefixText: 'Spieldaten exportieren',
|
||||||
],
|
prefixIcon: CupertinoIcons.square_arrow_up,
|
||||||
|
onTap: () {},
|
||||||
|
suffixWidget: const CupertinoListTileChevron(),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.symmetric(
|
CustomFormRow(
|
||||||
vertical: 10, horizontal: 15),
|
prefixText: AppLocalizations.of(context).create_issue,
|
||||||
child: const CupertinoListTileChevron()),
|
prefixIcon: FontAwesomeIcons.github,
|
||||||
CupertinoFormRow(
|
onTap: () => launchUrl(Uri.parse(
|
||||||
prefix: Row(
|
'https://github.com/flixcoo/Cabo-Counter/issues')),
|
||||||
children: [
|
suffixWidget: const CupertinoListTileChevron(),
|
||||||
Icon(
|
|
||||||
CupertinoIcons.square_arrow_down,
|
|
||||||
color: CustomTheme.primaryColor,
|
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
|
||||||
const Text('Spieldaten importieren'),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
vertical: 10, horizontal: 15),
|
|
||||||
child: const CupertinoListTileChevron())
|
|
||||||
])),
|
])),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: cabo_counter
|
|||||||
description: "Mobile app for the card game Cabo"
|
description: "Mobile app for the card game Cabo"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.3.9+333
|
version: 0.3.9+337
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.5.4
|
sdk: ^3.5.4
|
||||||
|
|||||||
Reference in New Issue
Block a user