getThemesFromJson function

List<TokenTheme> getThemesFromJson(
  1. Map<String, dynamic> input
)

Finds the themes in the input json

Implementation

List<TokenTheme> getThemesFromJson(Map<String, dynamic> input) {
  final themes = input['\$themes'] as List?;
  if (themes == null || themes.isEmpty) return [];

  return themes.map((e) => TokenTheme.fromJson(e as Map<String, dynamic>)).toList();
}