ApiObjectBlocks extension

Convenience accessors for ApiObject.blocks (a raw Map<String, dynamic> keyed by property definition id), sparing callers from hand-walking the JSON to find blocks by property.

on

Methods

blocksIn(String propertyId) List<Block>

Available on ApiObject, provided by the ApiObjectBlocks extension

Typed blocks under propertyId, or an empty list if none/absent.
lastBlockIn(String propertyId) Block?

Available on ApiObject, provided by the ApiObjectBlocks extension

The last block under propertyId (e.g. the one just appended), or null if that property has no blocks.