fromEntity static method

Future<PlayStoreModel?> fromEntity(
  1. String documentID,
  2. PlayStoreEntity? entity
)

Implementation

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