createConnectionLegacy static method
Implementation
static Future<SpikeConnectionV3> createConnectionLegacy({
required String appId,
required String authToken,
required String customerEndUserId,
String? desiredConnectionId,
}) async {
await NativeSDKBridgeV3.setWrapper(
type: "Flutter",
version: PackageVersion.version,
);
final connectionId = desiredConnectionId ?? UuidGenerator.generateV4();
final result = await NativeSDKBridgeV3.createConnectionLegacy(
connectionId: connectionId,
appId: appId,
authToken: authToken,
customerEndUserId: customerEndUserId,
);
ExceptionHandler.checkException(result);
final connection = SpikeConnectionV3.fromParameters(
connectionId: connectionId, appId: appId, customerEndUserId: customerEndUserId);
_connections[connectionId] = connection;
return connection;
}