getPage static method

Future<PageModel?> getPage(
  1. String appId,
  2. String? pageId, {
  3. String? alternativePageId,
})

Implementation

static Future<PageModel?> getPage(String appId, String? pageId,
    {String? alternativePageId}) async {
  PageModel? page;
  if (pageId != null) {
    page = await pageRepository(appId: appId)!.get(pageId);
  }
  if (page == null) {
    if (alternativePageId != null) {
      return await pageRepository(appId: appId)!.get(alternativePageId);
    }
  } else {
    return page;
  }
  return null;
}