buildSelectorWidgets method
Implementation
Widget buildSelectorWidgets(
BuildContext context, ThemeCollection themeCollection) {
final themeInfo = Theme.of(context);
return Row(
key: const Key('ThemeColorSelectorWidget'),
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: themeCollection.themes.entries.map<Widget>((theme) {
return RawMaterialButton(
onPressed: () {
onThemeColorChanged(context, theme.key);
},
constraints: BoxConstraints.tightFor(
width: selectorSize,
height: selectorSize,
),
fillColor: theme.value.colorScheme.primary,
shape: CircleBorder(
side: BorderSide(
color: theme.key == selectedTheme
? (themeInfo.brightness == Brightness.light
? Colors.black
: Colors.white)
: Colors.grey,
width: 3.0,
),
),
child: Semantics(
selected: theme.key == selectedTheme,
),
);
}).toList(),
);
}