simplified code across the app and consolidated duplicated helpers
This commit is contained in:
@@ -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',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user