variantsFromJson function
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);
}