MapPropertyStream class

A property stream for JSON object (map) values.

Provides:

  • A future that completes with the full parsed map
  • Chainable property getters to access nested properties

Use the chainable API to access nested properties:

final userMap = parser.getMapProperty('user');
final name = userMap.getStringProperty('name');
final age = userMap.getNumberProperty('age');
Inheritance

Constructors

MapPropertyStream({required Future<Map<String, Object?>> future, required JsonStreamParserController parserController, required String propertyPath})

Properties

future Future<Map<String, Object?>>
A future that completes with the final parsed value of this property.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getBooleanProperty(String key) BooleanPropertyStream
getListProperty<E extends Object?>(String key, {void onElement(PropertyStream propertyStream, int index)?}) ListPropertyStream<E>
getMapProperty(String key) MapPropertyStream
getNullProperty(String key) NullPropertyStream
getNumberProperty(String key) NumberPropertyStream
getStringProperty(String key) StringPropertyStream
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited