JsonMap class
Constructors
-
JsonMap(Map<String, dynamic>? map, [void _onError(String message)?])
-
Create JsonMap from Map<String, dynamic>
const
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
keys
→ Iterable<String>
-
All keys of this map
no setter
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cast<RK, RV>()
→ Map<RK, RV>
-
Cast source of the JsonMap
-
contains<T>(String key)
→ bool
-
Returns true if map contains the given
key
.
If a generic parameter is specified, then the value is also checked against the type of the parameter.
-
convert<T>(T converter(JsonMap jsonMap))
→ T
-
Convert JsonMap with converter.
-
convertEach<T>(T converter(String key, Json value))
→ Iterable<T>
-
Iterate by keys and convert items
-
getBool(String key, [bool? defaultValue])
→ bool
-
Returns bool value by
key
-
getBoolOr(String key, [bool? defaultValue])
→ bool?
-
Returns bool value by
key
or default value
-
getDouble(String key, [double? defaultValue])
→ double
-
Returns double value by
key
-
getDoubleOr(String key, [double? defaultValue])
→ double?
-
Returns double value by
key
or default value
-
getInt(String key, [int? defaultValue])
→ int
-
Returns int value by
key
or defaultValue
-
getIntOr(String key, [int? defaultValue])
→ int?
-
Returns int value by
key
or default value
-
getJson(String key, [Object? defaultValue])
→ Json
-
Returns Json by
key
-
getJsonList(String key, [List? defaultValue])
→ JsonList
-
Returns JsonList by
key
-
getJsonListOr(String key, [List? defaultValue])
→ JsonList?
-
Returns JsonList by
key
or default value
-
getJsonOr(String key, [Object? defaultValue])
→ Json?
-
Returns Json by
key
or default value
-
getList<T>(String key, [List<T>? defaultValue])
→ List<T>
-
Returns List
-
getListOr<T>(String key, [List<T>? defaultValue])
→ List<T>?
-
Returns List
-
getMap(String key, [Map<String, dynamic>? defaultValue])
→ JsonMap
-
Returns JsonMap by
key
-
getMapOr(String key, [Map<String, dynamic>? defaultValue])
→ JsonMap?
-
Returns JsonMap by
key
or default value
-
getNum(String key, [num? defaultValue])
→ num
-
Returns num value by
key
-
getNumOr(String key, [num? defaultValue])
→ num?
-
Returns num value by
key
or default value
-
getString(String key, [String? defaultValue])
→ String
-
Returns string value by
key
-
getStringOr(String key, [String? defaultValue])
→ String?
-
Returns string value by
key
or default value
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toJsonString()
→ String
-
Returns string representation of the map
-
toMap()
→ Map<String, dynamic>
-
Returns source of the JsonMap
-
toString()
→ String
-
A string representation of this object.
inherited