fromEntity static method

Future<LinkModel?> fromEntity(
  1. String documentID,
  2. LinkEntity? entity
)

Implementation

static Future<LinkModel?> fromEntity(
    String documentID, LinkEntity? entity) async {
  if (entity == null) return null;
  return LinkModel(
    documentID: documentID,
    linkText: entity.linkText,
    action: await ActionModel.fromEntity(entity.action),
  );
}