fromMap static method

LinkEntity? fromMap(
  1. Object? o, {
  2. Map<String, String>? newDocumentIds,
})

Implementation

static LinkEntity? fromMap(Object? o, {Map<String, String>? newDocumentIds}) {
  if (o == null) return null;
  var map = o as Map<String, dynamic>;

  var actionFromMap = map['action'];
  if (actionFromMap != null) {
    actionFromMap =
        ActionEntity.fromMap(actionFromMap, newDocumentIds: newDocumentIds);
  }

  return LinkEntity(
    linkText: map['linkText'],
    action: actionFromMap,
  );
}