buildThemeItems method
Builds the list of FastItem
that will be used to build the list items.
The list items are used to change the theme of the application.
Implementation
List<FastItem<ThemeMode>> buildThemeItems(BuildContext context) {
final formatThemeMode = themeModeFormatter ?? _formatThemeMode;
final systemLabel = formatThemeMode(ThemeMode.system);
final lightLabel = formatThemeMode(ThemeMode.light);
final darkLabel = formatThemeMode(ThemeMode.dark);
return [
buildThemeItem(
systemLabel,
ThemeMode.system,
buildLeadingIcon(_getSystemIcon(context)),
),
buildThemeItem(
lightLabel,
ThemeMode.light,
buildLeadingIcon(_getLightIcon(context)),
),
buildThemeItem(
darkLabel,
ThemeMode.dark,
buildLeadingIcon(_getDarkIcon(context)),
),
];
}