init static method
dynamic
init(
{ - bool enableCallKit = true,
})
Implementation
static init({bool enableCallKit = true}) {
ChatKitClientRepo.init();
IMKitRouter.instance.registerRouter(
RouterConstants.PATH_CHAT_PAGE,
(context) => ChatPage(
conversationId: IMKitRouter.getArgumentFormMap<String>(
context,
'conversationId',
)!,
conversationType: IMKitRouter.getArgumentFormMap<NIMConversationType>(
context,
'conversationType',
)!,
anchor: IMKitRouter.getArgumentFormMap<NIMMessage>(context, 'anchor'),
anchorDate: IMKitRouter.getArgumentFormMap<int>(context, 'anchorDate'),
),
);
IMKitRouter.instance.registerRouter(
RouterConstants.PATH_CHAT_COLLECTION_LIST_PAGE,
(context) => ChatCollectionMessageListPage(),
);
IMKitRouter.instance.registerRouter(
RouterConstants.PATH_CHAT_SEARCH_PAGE,
(context) => ChatSearchPage(
IMKitRouter.getArgumentFormMap<String>(context, 'teamId')!,
),
);
IMKitRouter.instance.registerRouter(
RouterConstants.PATH_CHAT_HISTORY_PAGE,
(context) => ChatHistoryMessagePage(
conversationId: IMKitRouter.getArgumentFormMap<String>(
context,
'conversationId',
)!,
conversationType: IMKitRouter.getArgumentFormMap<NIMConversationType>(
context,
'conversationType',
)!,
),
);
IMKitRouter.instance.registerRouter(
RouterConstants.PATH_CHAT_PIN_PAGE,
(context) => ChatPinPage(
conversationId: IMKitRouter.getArgumentFormMap<String>(
context,
'conversationId',
)!,
conversationType: IMKitRouter.getArgumentFormMap<NIMConversationType>(
context,
'conversationType',
)!,
chatTitle: IMKitRouter.getArgumentFormMap<String>(
context,
'chatTitle',
)!,
),
);
XKitReporter().register(moduleName: 'ChatUIKit', moduleVersion: '10.0.0');
}