From e30cb54e594847c53effa02b578da521cdebeda3 Mon Sep 17 00:00:00 2001 From: Thatsaphorn Atchariyaphap Date: Sat, 27 Sep 2025 15:20:11 +0200 Subject: [PATCH] Unused code --- .../modules/app/design_settings_view.dart | 152 +++++++++--------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/finlog_app/app/lib/modules/settings/modules/app/design_settings_view.dart b/finlog_app/app/lib/modules/settings/modules/app/design_settings_view.dart index 945ccc5..d703ef2 100644 --- a/finlog_app/app/lib/modules/settings/modules/app/design_settings_view.dart +++ b/finlog_app/app/lib/modules/settings/modules/app/design_settings_view.dart @@ -131,83 +131,83 @@ class _SystemBackgroundSection extends StatelessWidget { } } -class _SegItem extends StatelessWidget { - final IconData? icon; - final String? emoji; - final String label; +// class _SegItem extends StatelessWidget { +// final IconData? icon; +// final String? emoji; +// final String label; +// +// const _SegItem({this.icon, this.emoji, required this.label}); +// +// @override +// Widget build(BuildContext context) { +// return Padding( +// padding: const EdgeInsets.symmetric(horizontal: 12), +// child: Row( +// mainAxisSize: MainAxisSize.min, +// children: [ +// if (icon != null) Icon(icon, size: 18), +// if (emoji != null) Text(emoji!, style: const TextStyle(fontSize: 18)), +// const SizedBox(width: 8), +// Text(label), +// ], +// ), +// ); +// } +// } - const _SegItem({this.icon, this.emoji, required this.label}); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 12), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - if (icon != null) Icon(icon, size: 18), - if (emoji != null) Text(emoji!, style: const TextStyle(fontSize: 18)), - const SizedBox(width: 8), - Text(label), - ], - ), - ); - } -} - -class _TextScaleSection extends StatelessWidget { - const _TextScaleSection(); - - @override - Widget build(BuildContext context) { - final t = Translations.of(context); - final vm = context.watch(); - final selected = vm.textScale; - - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - t.settings.app.textSize, - style: const TextStyle(fontWeight: FontWeight.w600), - ), - const SizedBox(height: 8), - ToggleButtons( - isSelected: [ - selected == TextScalePref.system, - selected == TextScalePref.small, - selected == TextScalePref.medium, - selected == TextScalePref.large, - ], - onPressed: (i) { - switch (i) { - case 0: - vm.setTextScale(TextScalePref.system); - break; - case 1: - vm.setTextScale(TextScalePref.small); - break; - case 2: - vm.setTextScale(TextScalePref.medium); - break; - case 3: - vm.setTextScale(TextScalePref.large); - break; - } - }, - borderRadius: BorderRadius.circular(24), - constraints: const BoxConstraints(minHeight: 44, minWidth: 120), - children: [ - _SegItem(icon: Icons.phone_android, label: t.settings.app.system), - _SegItem(icon: Icons.text_fields, label: t.settings.app.small), - _SegItem(icon: Icons.text_fields, label: t.settings.app.medium), - _SegItem(icon: Icons.text_fields, label: t.settings.app.large), - ], - ), - ], - ); - } -} +// class _TextScaleSection extends StatelessWidget { +// const _TextScaleSection(); +// +// @override +// Widget build(BuildContext context) { +// final t = Translations.of(context); +// final vm = context.watch(); +// final selected = vm.textScale; +// +// return Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// t.settings.app.textSize, +// style: const TextStyle(fontWeight: FontWeight.w600), +// ), +// const SizedBox(height: 8), +// ToggleButtons( +// isSelected: [ +// selected == TextScalePref.system, +// selected == TextScalePref.small, +// selected == TextScalePref.medium, +// selected == TextScalePref.large, +// ], +// onPressed: (i) { +// switch (i) { +// case 0: +// vm.setTextScale(TextScalePref.system); +// break; +// case 1: +// vm.setTextScale(TextScalePref.small); +// break; +// case 2: +// vm.setTextScale(TextScalePref.medium); +// break; +// case 3: +// vm.setTextScale(TextScalePref.large); +// break; +// } +// }, +// borderRadius: BorderRadius.circular(24), +// constraints: const BoxConstraints(minHeight: 44, minWidth: 120), +// children: [ +// _SegItem(icon: Icons.phone_android, label: t.settings.app.system), +// _SegItem(icon: Icons.text_fields, label: t.settings.app.small), +// _SegItem(icon: Icons.text_fields, label: t.settings.app.medium), +// _SegItem(icon: Icons.text_fields, label: t.settings.app.large), +// ], +// ), +// ], +// ); +// } +// } class _LanguageSection extends StatelessWidget { const _LanguageSection();