When using a Material Switch with a thumb icon, the icon isn't colored correctly.
When the Switch is in its selected state, the icon becomes unreadable since it's white-on-white.
In the following screenshot, I've included the Yaru theme and the default ThemeData() Material theme:
Switch code snippet
This was put in example/lib/pages/theme_page/src/controls/toggleables.dart:
for (final theme in [null, ThemeData()])
Theme(
data: theme ?? Theme.of(context),
child: Wrap(
spacing: 10,
children: [
Switch(
onChanged: (value) {},
value: true,
thumbIcon: WidgetStateProperty.all(
const Icon(YaruIcons.ubuntu_logo),
),
),
Switch(
onChanged: (value) {},
value: false,
thumbIcon: WidgetStateProperty.all(
const Icon(YaruIcons.ubuntu_logo),
),
),
Switch(
value: true,
onChanged: null,
thumbIcon: WidgetStateProperty.all(
const Icon(YaruIcons.ubuntu_logo),
),
),
Switch(
value: false,
onChanged: null,
thumbIcon: WidgetStateProperty.all(
const Icon(YaruIcons.ubuntu_logo),
),
),
theme == null ? const Text('(Yaru)') : const Text('(Material)'),
],
),
),

When using a Material Switch with a thumb icon, the icon isn't colored correctly.
When the Switch is in its
selectedstate, the icon becomes unreadable since it's white-on-white.In the following screenshot, I've included the Yaru theme and the default
ThemeData()Material theme:Switch code snippet
This was put in
example/lib/pages/theme_page/src/controls/toggleables.dart: