HtmlAttributeEditor.fromJson constructor

HtmlAttributeEditor.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory HtmlAttributeEditor.fromJson(Map<String, dynamic> json) {
  return HtmlAttributeEditor(
    selector: json['selector']?.toString(),
    attributes:
        (json['attributes'] as Map).map((key, value) => MapEntry<String, String>(key as String, value as String)),
    maxCount: json.containsKey('max_count') ? (json['max_count'] as int) : 0,
  );
}