loadPageData method
Future<Json>
loadPageData(
{ - required DocumentId documentId,
- Model? model,
- ModelId? modelId,
})
Implementation
Future<Json> loadPageData({
required DocumentId documentId,
Model? model,
ModelId? modelId,
}) async {
assert(model != null || modelId != null);
await wait(duration: const Duration(milliseconds: 50));
final Model? effectiveModel = model ?? modelCollectionBloc.tryToFindModelById(modelId!);
if (effectiveModel == null) {
notFoundModelError(modelId ?? model!.id);
}
final Json data = await documentProvider.fetchDocument(
model: effectiveModel,
documentId: documentId,
subset: effectiveModel.flattenFields.realIds,
);
return data;
}