fromJson static method

Style fromJson(
  1. Map<String, dynamic>? attributes
)

Implementation

static Style fromJson(Map<String, dynamic>? attributes) {
  if (attributes == null) {
    return Style();
  }

  final result = attributes.map((key, dynamic value) {
    final attr = Attribute.fromKeyValue(key, value);
    return MapEntry<String, Attribute>(key, attr ?? Attribute(key, AttributeScope.ignore, value));
  });
  return Style.attr(result);
}