MapExtensions extension
extension methods for Map
- on
Properties
-
nullProtected
→ Map<
String, dynamic> -
Returns a new map with null keys or values removed
no setter
Methods
-
add<
T> ({required String? key, required T? value}) → T - Add value to map if value is not null
-
getBool(
String key, {bool defaultValue = defaultBool}) → bool -
Reads a
key
value of bool type from Map. -
getDouble(
String key, {double defaultValue = defaultDouble}) → double -
Reads a
key
value of double type from Map. -
getInt(
String key, {int defaultValue = defaultInt}) → int -
Reads a
key
value of int type from Map. -
getList(
String key) → List -
Reads a
key
value of List type from Map. -
getMap(
String key) → Map -
Reads a
key
value of List type from Map. -
getString(
String key, {String defaultValue = defaultString}) → String -
Reads a
key
value of String type from Map. -
toJson(
) → String -
Map to JSON using
json.encode
-
toPretty(
) → String - Convert map to a String withIndent