registerRouter method

void registerRouter({
  1. required String routeName,
  2. required WidgetBuilder builder,
})

Registers a route with the given routeName and builder.

This method should be called separately during the initUIKit process of TencentCloudChatController for each component (e.g. Message or Conversation) in the main function of the application. It automatically adds the component to the global routing table, allowing other components to navigate to it.

Implementation

void registerRouter({
  required String routeName,
  required WidgetBuilder builder,
}) {
  routes[routeName] = builder;
}