TLSConfigPatterns extension

Adds pattern-matching-related methods to TLSConfig.

on

Methods

map<TResult extends Object?>(TResult $default(_TLSConfig value)) → TResult

Available on TLSConfig, provided by the TLSConfigPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_TLSConfig value)?) → TResult?

Available on TLSConfig, provided by the TLSConfigPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_TLSConfig value)?, {required TResult orElse()}) → TResult

Available on TLSConfig, provided by the TLSConfigPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(bool? allowInsecure, List<TLSCertConfig>? certs, String? serverName, XrayStringList? alpn, bool? enableSessionResumption, bool? disableSystemRoot, String? minVersion, String? maxVersion, String? cipherSuites, String? fingerprint, bool? rejectUnknownSNI, XrayStringList? curvePreferences, String? masterKeyLog, String? pinnedPeerCertSha256, String? verifyPeerCertByName, List<String>? verifyPeerCertInNames, String? echServerKeys, String? echConfigList, ECHForceQuery? echForceQuery, SocketConfig? echSocketSettings)?, {required TResult orElse()}) → TResult

Available on TLSConfig, provided by the TLSConfigPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(bool? allowInsecure, List<TLSCertConfig>? certs, String? serverName, XrayStringList? alpn, bool? enableSessionResumption, bool? disableSystemRoot, String? minVersion, String? maxVersion, String? cipherSuites, String? fingerprint, bool? rejectUnknownSNI, XrayStringList? curvePreferences, String? masterKeyLog, String? pinnedPeerCertSha256, String? verifyPeerCertByName, List<String>? verifyPeerCertInNames, String? echServerKeys, String? echConfigList, ECHForceQuery? echForceQuery, SocketConfig? echSocketSettings)) → TResult

Available on TLSConfig, provided by the TLSConfigPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(bool? allowInsecure, List<TLSCertConfig>? certs, String? serverName, XrayStringList? alpn, bool? enableSessionResumption, bool? disableSystemRoot, String? minVersion, String? maxVersion, String? cipherSuites, String? fingerprint, bool? rejectUnknownSNI, XrayStringList? curvePreferences, String? masterKeyLog, String? pinnedPeerCertSha256, String? verifyPeerCertByName, List<String>? verifyPeerCertInNames, String? echServerKeys, String? echConfigList, ECHForceQuery? echForceQuery, SocketConfig? echSocketSettings)?) → TResult?

Available on TLSConfig, provided by the TLSConfigPatterns extension

A variant of when that fallback to returning null