AuthConfig class sealed

Available extensions
Annotations
  • @freezed

Constructors

AuthConfig.basic({required String username, required String password})
HTTP Basic authentication.
const
factory
AuthConfig.bearer({required String token})
Bearer token authentication.
const
factory
AuthConfig.header({required String name, required String value})
Custom authentication header.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult basic(AuthConfig_Basic value), required TResult bearer(AuthConfig_Bearer value), required TResult header(AuthConfig_Header value)}) → TResult

Available on AuthConfig, provided by the AuthConfigPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? basic(AuthConfig_Basic value)?, TResult? bearer(AuthConfig_Bearer value)?, TResult? header(AuthConfig_Header value)?}) → TResult?

Available on AuthConfig, provided by the AuthConfigPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult basic(AuthConfig_Basic value)?, TResult bearer(AuthConfig_Bearer value)?, TResult header(AuthConfig_Header value)?, required TResult orElse()}) → TResult

Available on AuthConfig, provided by the AuthConfigPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult basic(String username, String password)?, TResult bearer(String token)?, TResult header(String username, String password)?, required TResult orElse()}) → TResult

Available on AuthConfig, provided by the AuthConfigPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult basic(String username, String password), required TResult bearer(String token), required TResult header(String username, String password)}) → TResult

Available on AuthConfig, provided by the AuthConfigPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? basic(String username, String password)?, TResult? bearer(String token)?, TResult? header(String username, String password)?}) → TResult?

Available on AuthConfig, provided by the AuthConfigPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited