fromMap static method

MetaTag? fromMap(
  1. Map<String, dynamic>? map, {
  2. EnumMethod? enumMethod,
})

Gets a possible MetaTag instance from a Map value.

Implementation

static MetaTag? fromMap(Map<String, dynamic>? map, {EnumMethod? enumMethod}) {
  if (map == null) {
    return null;
  }
  final instance = MetaTag(
    attrs: map['attrs'] != null
        ? List<MetaTagAttribute>.from(
            map['attrs'].map(
              (e) => MetaTagAttribute.fromMap(
                e?.cast<String, dynamic>(),
                enumMethod: enumMethod,
              )!,
            ),
          )
        : null,
    content: map['content'],
    name: map['name'],
  );
  return instance;
}