variantsFromJson function

Map<String, Text>? variantsFromJson(
  1. Map<String, dynamic>? json
)

Implementation

Map<String, Text>? variantsFromJson(Map<String, dynamic>? json) {
  if (json == null) return null;

  final data = json.entries.map(
    (e) => MapEntry(e.key, Text.fromJson(e.value as Map<String, dynamic>)),
  );

  return Map.fromEntries(data);
}