PlatformToggleConverter class
JsonConverter for PlatformToggle that accepts the legacy bool-or-string
YAML grammar.
Accepted inputs:
nullorfalse→ PlatformToggle.disabledtrue→ PlatformToggle.enabled- non-empty
String→ PlatformToggle.named
Anything else (numbers, lists, maps, empty strings) throws.
Constructors
- PlatformToggleConverter()
-
Creates a converter instance.
const
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
-
fromJson(
Object? json) → PlatformToggle -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
PlatformToggle object) → Object -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited