fromEntity static method

Future<ProfileModel?> fromEntity(
  1. String documentID,
  2. ProfileEntity? entity
)

Implementation

static Future<ProfileModel?> fromEntity(
    String documentID, ProfileEntity? entity) async {
  if (entity == null) return null;
  return ProfileModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    backgroundOverride:
        await BackgroundModel.fromEntity(entity.backgroundOverride),
    conditions: await StorageConditionsModel.fromEntity(entity.conditions),
  );
}