fromEntity static method

Future<TutorialEntryModel?> fromEntity(
  1. String documentID,
  2. TutorialEntryEntity? entity
)

Implementation

static Future<TutorialEntryModel?> fromEntity(
    String documentID, TutorialEntryEntity? entity) async {
  if (entity == null) return null;
  return TutorialEntryModel(
    documentID: documentID,
    description: entity.description,
    code: entity.code,
  );
}