simplified code across the app and consolidated duplicated helpers

This commit is contained in:
2026-09-27 17:29:54 +02:00
parent 3e856d0b1c
commit ee1240f71a
155 changed files with 1772 additions and 2546 deletions
@@ -41,25 +41,15 @@ class AppearanceSection extends StatelessWidget {
);
}
IconData _hapticIcon(HapticLevel level) {
switch (level) {
case HapticLevel.off:
return Icons.notifications_off_outlined;
case HapticLevel.reduced:
return Icons.notifications_paused_outlined;
case HapticLevel.full:
return Icons.notifications_active_outlined;
}
}
IconData _hapticIcon(HapticLevel level) => switch (level) {
HapticLevel.off => Icons.notifications_off_outlined,
HapticLevel.reduced => Icons.notifications_paused_outlined,
HapticLevel.full => Icons.notifications_active_outlined,
};
String _hapticLabel(HapticLevel level) {
switch (level) {
case HapticLevel.off:
return 'Aus';
case HapticLevel.reduced:
return 'Reduziert';
case HapticLevel.full:
return 'Vollständig';
}
}
String _hapticLabel(HapticLevel level) => switch (level) {
HapticLevel.off => 'Aus',
HapticLevel.reduced => 'Reduziert',
HapticLevel.full => 'Vollständig',
};
}