refactor: deduplicate shared patterns, replace hardcoded colors

This commit is contained in:
edde746
2026-03-03 22:43:00 +01:00
parent 8f3d52142d
commit cd2ab9d9cd
42 changed files with 685 additions and 612 deletions
@@ -524,9 +524,10 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
final isSelected = (currentRate - speed).abs() < 0.01;
final label = speed == 1.0 ? 'Normal' : '${speed.toStringAsFixed(2)}x';
return ListTile(
title: Text(label, style: TextStyle(color: isSelected ? Colors.blue : null)),
trailing: isSelected ? const AppIcon(Symbols.check_rounded, fill: 1, color: Colors.blue) : null,
final primary = Theme.of(context).colorScheme.primary;
return FocusableListTile(
title: Text(label, style: TextStyle(color: isSelected ? primary : null)),
trailing: isSelected ? AppIcon(Symbols.check_rounded, fill: 1, color: primary) : null,
onTap: () async {
widget.player.setRate(speed);
// Save as default playback speed
@@ -641,9 +642,10 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
final isSelected = device.name == currentDevice.name;
final label = device.description.isEmpty ? device.name : device.description;
return ListTile(
title: Text(label, style: TextStyle(color: isSelected ? Colors.blue : null)),
trailing: isSelected ? const AppIcon(Symbols.check_rounded, fill: 1, color: Colors.blue) : null,
final primary = Theme.of(context).colorScheme.primary;
return FocusableListTile(
title: Text(label, style: TextStyle(color: isSelected ? primary : null)),
trailing: isSelected ? AppIcon(Symbols.check_rounded, fill: 1, color: primary) : null,
onTap: () {
widget.player.setAudioDevice(device);
OverlaySheetController.of(context).close();