Map<String, dynamic> toMap() { return { 'family': family, if (fonts != null) 'fonts': fonts?.map((e) => e.toMap()).toList(), }; }