registerSingletons function

void registerSingletons({
  1. required ServiceType serviceType,
})

Registers a singleton instance of ChatBridgeConfig class in GetIt instance named bridgeLocator.

Throws an error if GetIt instance is not initialized yet.

serviceType specifies the type of service provided by the chat bridge configuration.

Implementation

void registerSingletons({
  required ServiceType serviceType,
}) {
  /// Register a singleton instance of [ChatBridgeConfig] in [bridgeLocator]
  bridgeLocator.registerSingleton<ChatBridgeConfig>(
    ChatBridgeConfig(
      serviceType: serviceType,
    ),
  );
}