readMap method

Map<String, Object> readMap(
  1. Iterable<String> pathSegments
)

Implementation

Map<String, Object> readMap(Iterable<String> pathSegments) {
  Object? data = options;

  for (final key in pathSegments) {
    if (data is Map<String, Object?> && data.containsKey(key)) {
      data = data[key];
    } else {
      return {};
    }
  }

  return data is Map<String, Object> ? data : {};
}