init method

dynamic init(
  1. ComponentConstructor membershipDashboardComponentConstructorDefault,
  2. ComponentEditorConstructor membershipDashboardComponentEditorConstructor
)

Implementation

init(
  ComponentConstructor membershipDashboardComponentConstructorDefault,
  ComponentEditorConstructor membershipDashboardComponentEditorConstructor,
) {
  Apis.apis()
      .getRegistryApi()
      .addInternalComponents('eliud_pkg_membership_model', [
    "membershipDashboards",
  ]);

  Apis.apis().getRegistryApi().addDropDownSupporter(
      "membershipDashboards", DropdownButtonComponentFactory());
  Apis.apis().getRegistryApi().register(
      componentName: "membershipDashboards",
      componentConstructor: membershipDashboardComponentConstructorDefault);
  Apis.apis()
      .getRegistryApi()
      .addComponentSpec('eliud_pkg_membership_model', 'membership', [
    ComponentSpec(
        'membershipDashboards',
        membershipDashboardComponentConstructorDefault,
        MembershipDashboardComponentSelector(),
        membershipDashboardComponentEditorConstructor,
        ({String? appId}) => membershipDashboardRepository(appId: appId)!),
  ]);
  Apis.apis().getRegistryApi().registerRetrieveRepository(
      'eliud_pkg_membership_model',
      'membershipDashboards',
      ({String? appId}) => membershipDashboardRepository(appId: appId)!);
}