SyncServerChoice class sealed

Available extensions
Annotations
  • @freezed

Constructors

SyncServerChoice.custom({required String url, SyncServerKey? key})
A URL the user typed, and the key they gave for it (null = none). The URL is validated at the door like endpointUrl, and bounded (2048 bytes) before the validator sees it.
const
factory
SyncServerChoice.default_()
Clear the choice: back to endpointUrl.
const
factory
SyncServerChoice.predefined({required String id})
One of the offered entries, by id.
const
factory
SyncServerChoice.unknown()
Forward-compatibility arm (never accepted as input).
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 predefined(SyncServerChoice_Predefined value), required TResult custom(SyncServerChoice_Custom value), required TResult default_(SyncServerChoice_Default value), required TResult unknown(SyncServerChoice_Unknown value)}) → TResult

Available on SyncServerChoice, provided by the SyncServerChoicePatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? predefined(SyncServerChoice_Predefined value)?, TResult? custom(SyncServerChoice_Custom value)?, TResult? default_(SyncServerChoice_Default value)?, TResult? unknown(SyncServerChoice_Unknown value)?}) → TResult?

Available on SyncServerChoice, provided by the SyncServerChoicePatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult predefined(SyncServerChoice_Predefined value)?, TResult custom(SyncServerChoice_Custom value)?, TResult default_(SyncServerChoice_Default value)?, TResult unknown(SyncServerChoice_Unknown value)?, required TResult orElse()}) → TResult

Available on SyncServerChoice, provided by the SyncServerChoicePatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult predefined(String id)?, TResult custom(String url, SyncServerKey? key)?, TResult default_()?, TResult unknown()?, required TResult orElse()}) → TResult

Available on SyncServerChoice, provided by the SyncServerChoicePatterns 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 predefined(String id), required TResult custom(String url, SyncServerKey? key), required TResult default_(), required TResult unknown()}) → TResult

Available on SyncServerChoice, provided by the SyncServerChoicePatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? predefined(String id)?, TResult? custom(String url, SyncServerKey? key)?, TResult? default_()?, TResult? unknown()?}) → TResult?

Available on SyncServerChoice, provided by the SyncServerChoicePatterns extension

A variant of when that fallback to returning null

Operators

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