init method

dynamic init(
  1. ComponentConstructor albumComponentConstructorDefault,
  2. ComponentEditorConstructor albumComponentEditorConstructor
)

Implementation

init(
  ComponentConstructor albumComponentConstructorDefault,
  ComponentEditorConstructor albumComponentEditorConstructor,
) {
  Apis.apis()
      .getRegistryApi()
      .addInternalComponents('eliud_pkg_medium_model', [
    "albums",
  ]);

  Apis.apis()
      .getRegistryApi()
      .addDropDownSupporter("albums", DropdownButtonComponentFactory());
  Apis.apis().getRegistryApi().register(
      componentName: "albums",
      componentConstructor: albumComponentConstructorDefault);
  Apis.apis()
      .getRegistryApi()
      .addComponentSpec('eliud_pkg_medium_model', 'medium', [
    ComponentSpec(
        'albums',
        albumComponentConstructorDefault,
        AlbumComponentSelector(),
        albumComponentEditorConstructor,
        ({String? appId}) => albumRepository(appId: appId)!),
  ]);
  Apis.apis().getRegistryApi().registerRetrieveRepository(
      'eliud_pkg_medium_model',
      'albums',
      ({String? appId}) => albumRepository(appId: appId)!);
}