updateFromBackend static method

void updateFromBackend({
  1. bool? enableManualCapture,
  2. String? companyName,
  3. String? companyLogoUrl,
})

Update configuration with SDK config from backend

Implementation

static void updateFromBackend({
  bool? enableManualCapture,
  String? companyName,
  String? companyLogoUrl,
}) {
  if (_instance == null) {
    throw StateError(
      'ApexKycConfig not initialized. Call ApexKycConfig.initialize() first.',
    );
  }
  // Create new instance with updated values
  final current = _instance!;
  _instance = ApexKycConfig._(
    baseUrl: current.baseUrl,
    apiKey: current.apiKey,
    timeoutSeconds: current.timeoutSeconds,
    enableLogging: current.enableLogging,
    enableManualCapture: enableManualCapture ?? current.enableManualCapture,
    companyName: companyName ?? current.companyName,
    companyLogoUrl: companyLogoUrl ?? current.companyLogoUrl,
  );
}