# fromEntityPlus method Null safety

dynamic fromEntityPlus(

1. String documentID,
2. TutorialEntity? entity,
3. {String? appId}

)

## Implementation

    static Future<TutorialModel?> fromEntityPlus(
        String documentID, TutorialEntity? entity,
        {String? appId}) async {
      if (entity == null) return null;

      var counter = 0;
      return TutorialModel(
        documentID: documentID,
        appId: entity.appId ?? '',
        name: entity.name,
        title: entity.title,
        description: entity.description,
        tutorialEntries: entity.tutorialEntries == null
            ? null
            : List<TutorialEntryModel>.from(
                await Future.wait(entity.tutorialEntries!.map((item) {
                counter++;
                return TutorialEntryModel.fromEntityPlus(counter.toString(), item,
                    appId: appId);
              }).toList())),
        conditions: await StorageConditionsModel.fromEntityPlus(entity.conditions,
            appId: appId),
      );
    }