toJson method

Map<String, dynamic> toJson()

JSON form intended for the platform channel. Sensitive fields (authTokenProvider is non-serializable; tokens never appear here) are omitted by construction.

Implementation

Map<String, dynamic> toJson() => {
      'mode': mode.wire,
      if (backendBaseUrl != null) 'backendBaseUrl': backendBaseUrl,
      'requestTimeoutMs': requestTimeout.inMilliseconds,
      'retryPolicy': retryPolicy.toJson(),
      if (extraHeaders.isNotEmpty)
        'extraHeaders': Map<String, String>.from(extraHeaders),
    };