Unused code
This commit is contained in:
@@ -131,83 +131,83 @@ class _SystemBackgroundSection extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SegItem extends StatelessWidget {
|
// class _SegItem extends StatelessWidget {
|
||||||
final IconData? icon;
|
// final IconData? icon;
|
||||||
final String? emoji;
|
// final String? emoji;
|
||||||
final String label;
|
// 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});
|
// class _TextScaleSection extends StatelessWidget {
|
||||||
|
// const _TextScaleSection();
|
||||||
@override
|
//
|
||||||
Widget build(BuildContext context) {
|
// @override
|
||||||
return Padding(
|
// Widget build(BuildContext context) {
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
// final t = Translations.of(context);
|
||||||
child: Row(
|
// final vm = context.watch<DesignSettingsViewModel>();
|
||||||
mainAxisSize: MainAxisSize.min,
|
// final selected = vm.textScale;
|
||||||
children: [
|
//
|
||||||
if (icon != null) Icon(icon, size: 18),
|
// return Column(
|
||||||
if (emoji != null) Text(emoji!, style: const TextStyle(fontSize: 18)),
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
const SizedBox(width: 8),
|
// children: [
|
||||||
Text(label),
|
// Text(
|
||||||
],
|
// t.settings.app.textSize,
|
||||||
),
|
// style: const TextStyle(fontWeight: FontWeight.w600),
|
||||||
);
|
// ),
|
||||||
}
|
// const SizedBox(height: 8),
|
||||||
}
|
// ToggleButtons(
|
||||||
|
// isSelected: [
|
||||||
class _TextScaleSection extends StatelessWidget {
|
// selected == TextScalePref.system,
|
||||||
const _TextScaleSection();
|
// selected == TextScalePref.small,
|
||||||
|
// selected == TextScalePref.medium,
|
||||||
@override
|
// selected == TextScalePref.large,
|
||||||
Widget build(BuildContext context) {
|
// ],
|
||||||
final t = Translations.of(context);
|
// onPressed: (i) {
|
||||||
final vm = context.watch<DesignSettingsViewModel>();
|
// switch (i) {
|
||||||
final selected = vm.textScale;
|
// case 0:
|
||||||
|
// vm.setTextScale(TextScalePref.system);
|
||||||
return Column(
|
// break;
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// case 1:
|
||||||
children: [
|
// vm.setTextScale(TextScalePref.small);
|
||||||
Text(
|
// break;
|
||||||
t.settings.app.textSize,
|
// case 2:
|
||||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
// vm.setTextScale(TextScalePref.medium);
|
||||||
),
|
// break;
|
||||||
const SizedBox(height: 8),
|
// case 3:
|
||||||
ToggleButtons(
|
// vm.setTextScale(TextScalePref.large);
|
||||||
isSelected: [
|
// break;
|
||||||
selected == TextScalePref.system,
|
// }
|
||||||
selected == TextScalePref.small,
|
// },
|
||||||
selected == TextScalePref.medium,
|
// borderRadius: BorderRadius.circular(24),
|
||||||
selected == TextScalePref.large,
|
// constraints: const BoxConstraints(minHeight: 44, minWidth: 120),
|
||||||
],
|
// children: [
|
||||||
onPressed: (i) {
|
// _SegItem(icon: Icons.phone_android, label: t.settings.app.system),
|
||||||
switch (i) {
|
// _SegItem(icon: Icons.text_fields, label: t.settings.app.small),
|
||||||
case 0:
|
// _SegItem(icon: Icons.text_fields, label: t.settings.app.medium),
|
||||||
vm.setTextScale(TextScalePref.system);
|
// _SegItem(icon: Icons.text_fields, label: t.settings.app.large),
|
||||||
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 {
|
class _LanguageSection extends StatelessWidget {
|
||||||
const _LanguageSection();
|
const _LanguageSection();
|
||||||
|
|||||||
Reference in New Issue
Block a user