JsonValue class
Small, defensive helpers for reading JSON-like maps.
Flutter callers often build payloads as Map<String, Object?>, while
decoded JSON commonly arrives as Map<String, dynamic>. These helpers keep
config factories structural instead of depending on exact generic types.
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
-
boolMap(
Object? value) → Map< String, bool> ? -
boolOrNull(
Object? value) → bool? -
clone(
Object? value) → Object? - Deep-copies JSON-like maps and lists while normalizing map keys to strings. Scalar/object values are preserved by reference.
-
cloneMap(
Map value) → Map< String, dynamic> -
deepEquals(
Object? a, Object? b) → bool - Deep equality for JSON-like maps/lists, with map keys compared as strings.
-
deepHash(
Object? value) → int - Deep hash matching deepEquals for JSON-like maps/lists.
-
doubleList(
Object? value) → List< double> ? -
doubleOrNull(
Object? value) → double? -
enumValue<
T extends Enum> (Iterable< T> values, Object? raw, {T? fallback}) → T? -
freeze(
Object? value) → Object? - Deep-copies and freezes JSON-like maps/lists while normalizing map keys.
-
freezeMap(
Map value) → Map< String, dynamic> -
intList(
Object? value) → List< int> ? -
intMatrix(
Object? value) → List< List< ?int> > -
intOrNull(
Object? value) → int? -
list(
Object? value) → List? -
map(
Object? value) → Map< String, dynamic> ? -
mapList(
Object? value) → List< Map< ?String, dynamic> > -
string(
Object? value) → String? -
stringList(
Object? value) → List< String> ?
Constants
- maxTraversalDepth → const int
- Prevents recursive JSON-like helpers from overflowing the stack on malicious or accidentally over-nested input.