getThemeById method

BaseThemeConfig? getThemeById(
  1. String id
)

Get a theme by ID.

Returns null if no theme with the given ID is found.

Implementation

BaseThemeConfig? getThemeById(String id) {
  try {
    return _themes.firstWhere((theme) => theme.id == id);
  } catch (_) {
    return null;
  }
}