Unused code
This commit is contained in:
@@ -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<DesignSettingsViewModel>();
|
||||
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<DesignSettingsViewModel>();
|
||||
// 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();
|
||||
|
||||
Reference in New Issue
Block a user