Credential class

Container for your Credentials. Based on your use case all fields can be null.

Annotations
  • @Freezed(fromJson: true, toJson: true)

Constructors

Credential({String? username, String? password, String? domain})
Create a new Credential, the username and password are both optional, even if this is not useful and therefore not recommended to keep both values null. For iOS and MacOS the domain is mandatory, on other platforms this field is not used.
const
factory

Properties

copyWith → $CredentialCopyWith<Credential>
Create a copy of Credential with the given fields replaced by the non-null parameter values.
no setterinherited
domain String?
The domain of the credential, only used on iOS and MacOS.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
password String?
The nullable password.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
username String?
The nullable username.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Credential to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromMap(Map<String, Object?>? map) Credential?
Get the Credential from a Map.