Attributes.fromMap constructor

Attributes.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Attributes.fromMap(Map<String, dynamic> map) {
  final type = EnumToString.fromString(AttributesType.values, map['type']) ??
      AttributesType.NULL;
  final json = map['data'];
  return Attributes(type, json);
}