buildThemeItem method

FastItem<ThemeMode> buildThemeItem(
  1. String name,
  2. ThemeMode themeMode,
  3. Widget icon
)

Builds a FastItem that will be used to build a list item.

Implementation

FastItem<ThemeMode> buildThemeItem(
  String name,
  ThemeMode themeMode,
  Widget icon,
) {
  final descriptor = listItemDescriptor ?? const FastListItemDescriptor();

  return FastItem(
    descriptor: descriptor.copyWith(leading: icon),
    value: themeMode,
    labelText: name,
  );
}