mapAt<TState, TAggregate> method

Map<TState, TAggregate>? mapAt<TState, TAggregate>(
  1. String path, {
  2. Map<TState, TAggregate>? defaultMap,
})

Get Map with keys of type TState and values of type TAggregate at given path

Implementation

Map<TState, TAggregate>? mapAt<TState, TAggregate>(String path,
    {Map<TState, TAggregate>? defaultMap}) {
  final map = elementAt(path);
  return map == null ? defaultMap : Map<TState, TAggregate>.from(map as Map);
}