map/map_nested_extensions library
Functions
-
getNested(
Map< String, dynamic> map, List<String> path, [Object? defaultValue]) → Object? - Get/set nested value by path (list of keys).
-
setNested(
Map< String, dynamic> map, List<String> path, Object? value) → void -
Sets
valueat the nested location addressed bypathinmap, creating intermediate maps as needed. Does nothing ifpathis empty, or stops early if an existing intermediate value alongpathis not a map.