getListProperty<E extends Object?> method

ListPropertyStream<E> getListProperty<E extends Object?>(
  1. String key, {
  2. void onElement(
    1. PropertyStream propertyStream,
    2. int index
    )?,
})

Implementation

ListPropertyStream<E> getListProperty<E extends Object?>(
  String key, {
  void Function(PropertyStream propertyStream, int index)? onElement,
}) {
  final fullPath = _propertyPath.isEmpty ? key : '$_propertyPath.$key';

  final listStream = _parserController.getPropertyStream(fullPath, List)
      as ListPropertyStream<E>;

  if (onElement != null) {
    listStream.onElement(onElement);
  }

  return listStream;
}