toString method

  1. @override
String toString()
override

toString is intentionally terse and redacts both the auth provider closure (it could close over secrets) and the contents of extraHeaders (POS apps occasionally store API keys there even though we forbid it).

Implementation

@override
String toString() =>
    'GatewayConfig(mode=${mode.wire}, baseUrl=${backendBaseUrl ?? "<none>"}, '
    'timeoutMs=${requestTimeout.inMilliseconds}, '
    'authProvider=${authTokenProvider == null ? "<none>" : "[REDACTED]"}, '
    'extraHeaders=${extraHeaders.isEmpty ? "[]" : "[REDACTED]"})';