import 'package:flutter/material.dart'; import '../../core/theme/app_colors.dart'; /// Shared Settings switch styling so each card matches the rest of the page. class SettingsSwitch extends StatelessWidget { const SettingsSwitch({ super.key, required this.value, required this.onChanged, required this.semanticsLabel, }); final bool value; final ValueChanged onChanged; final String semanticsLabel; @override Widget build(BuildContext context) { final colors = context.colors; return Semantics( label: semanticsLabel, child: Switch( value: value, onChanged: onChanged, thumbColor: WidgetStateProperty.resolveWith( (states) => states.contains(WidgetState.selected) ? colors.accentInk : colors.inkFaint, ), trackColor: WidgetStateProperty.resolveWith( (states) => states.contains(WidgetState.selected) ? colors.accent : colors.surfaceStrong, ), trackOutlineColor: WidgetStatePropertyAll(colors.border), ), ); } }