StringMapExtensions extension

Extension methods for String-keyed dynamic maps.

on

Methods

formatMap() String

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns a human-readable string representation of this map with indentation.
getChildString(String childKey) String?

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns the value for childKey as a String, or null if the key is missing or the value is not a String.
getGrandchild(String childKey, String grandChildKey) → dynamic

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns the nested value at childKeygrandChildKey, or null if either key is missing or the child is not a map.
getGrandchildString(String childKey, String grandChildKey) String?

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns the nested value at childKeygrandChildKey as a String, or null if either key is missing or the value is not a String.
getGreatGrandchild({required String childKey, required String grandChildKey, required String greatGrandChildKey}) → dynamic

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns the nested value at childKeygrandChildKeygreatGrandChildKey, or null if any key is missing.
getGreatGrandchildString({required String childKey, required String grandChildKey, required String greatGrandChildKey}) String?

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns the nested value at childKeygrandChildKeygreatGrandChildKey as a String, or null if any key is missing or the value is not a String.
getValue(String? key) Map<String, dynamic>?

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns the value for key as a Map<String, dynamic>, or null if the key is missing or the value cannot be converted.
removeKeys(List<String>? removeKeysList, {bool recurseChildValues = true}) bool

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns true after removing all keys in removeKeysList from this map.
toKeySorted() Map<String, dynamic>

Available on Map<String, dynamic>, provided by the StringMapExtensions extension

Returns a new Map<String, dynamic> with keys sorted alphabetically.