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 likeendpointUrl, and bounded (2048 bytes) before the validator sees it.constfactory - SyncServerChoice.default_()
-
Clear the choice: back to
endpointUrl.constfactory - SyncServerChoice.predefined({required String id})
-
One of the offered entries, by id.
constfactory
- SyncServerChoice.unknown()
-
Forward-compatibility arm (never accepted as input).
constfactory
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
Aswitch-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 ofmapthat fallback to returningnull. -
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 ofmapthat fallback to returningorElse. -
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 ofwhenthat fallback to anorElsecallback. -
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
Aswitch-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 ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited