init method
dynamic
init(
- ComponentConstructor notificationDashboardComponentConstructorDefault,
- ComponentEditorConstructor notificationDashboardComponentEditorConstructor
Implementation
init(
ComponentConstructor notificationDashboardComponentConstructorDefault,
ComponentEditorConstructor notificationDashboardComponentEditorConstructor,
) {
Apis.apis()
.getRegistryApi()
.addInternalComponents('eliud_pkg_notifications_model', [
"notifications",
"notificationDashboards",
]);
Apis.apis().getRegistryApi().addDropDownSupporter(
"notificationDashboards", DropdownButtonComponentFactory());
Apis.apis().getRegistryApi().register(
componentName: "notificationDashboards",
componentConstructor: notificationDashboardComponentConstructorDefault);
Apis.apis()
.getRegistryApi()
.addComponentSpec('eliud_pkg_notifications_model', 'notifications', [
ComponentSpec(
'notificationDashboards',
notificationDashboardComponentConstructorDefault,
NotificationDashboardComponentSelector(),
notificationDashboardComponentEditorConstructor,
({String? appId}) => notificationDashboardRepository(appId: appId)!),
]);
Apis.apis().getRegistryApi().registerRetrieveRepository(
'eliud_pkg_notifications_model',
'notifications',
({String? appId}) => notificationRepository(appId: appId)!);
Apis.apis().getRegistryApi().registerRetrieveRepository(
'eliud_pkg_notifications_model',
'notificationDashboards',
({String? appId}) => notificationDashboardRepository(appId: appId)!);
}