ServerConfig class

The configuration for a single server

Annotations
  • @JsonSerializable()

Constructors

ServerConfig({required ServerType type, required String hostname, required int port, required SocketType socketType, required Authentication authentication, required UsernameType usernameType, Authentication? authenticationAlternative})
Creates a new server configuration
const
ServerConfig.empty()
Creates a new server configuration with the default values
const
ServerConfig.fromJson(Map<String, dynamic> json)
Creates a new ServerConfig from the given json
factory

Properties

authentication Authentication
The used main authentication mechanism
final
authenticationAlternative Authentication?
The used secondary authentication mechanism
final
authenticationAlternativeName String?
The name of the secondary authentication
no setter
authenticationName String
The name of the main authentication
no setter
hashCode int
The hash code for this object.
no setteroverride
hostname String
The host
final
isSecureSocket bool
Retrieves true when this server uses a secure connection
no setter
port int
The port
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socketType SocketType
The connection security
final
socketTypeName String
The name of the connection security
no setter
type ServerType
The server type
final
typeName String
The name of the server type
no setter
username String
The name of the username configuration
no setter
usernameType UsernameType
The username configuration
final

Methods

copyWith({ServerType? type, String? hostname, int? port, SocketType? socketType, Authentication? authentication, Authentication? authenticationAlternative, UsernameType? usernameType}) ServerConfig
Creates a copy of this ServerConfig with the specified values
getUserName(String email) String?
Retrieves the user name based on the specified email address. Returns null in case usernameType is UsernameType.realName or UsernameType.unknown.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Generates json from this ServerConfig
toString() String
A string representation of this object.
override

Operators

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