PreferencesCodec class
Versioned JSON encoding that preserves doubles, including whole-valued ones, negative zero and non-finite values. Legacy plain JSON maps remain readable.
Constructors
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decode(
String contents) → Map< String, Object> - Decodes the current format or a legacy untyped JSON map.
-
decodeData(
String contents) → DecodedPreferences - Retains explicit types on JavaScript, where 1 and 1.0 share a number type.
-
encode(
Map< String, Object?> values, {Map<String, String> types = const {}}) → String - Encodes values in an explicitly typed envelope.