Block class

A base representation of any Notion block object.

Inheritance
Implementers

Constructors

Block({String id = '', bool hasChildren = false, Map<String, dynamic> jsonContent = const {}, BlockTypes type = BlockTypes.None, String createdTime = '', String lastEditedTime = ''})
Main block constructor.
Block.fromJson(Map<String, dynamic> json)
Create a new Block instance from json.

Properties

createdTime ↔ String
The creation time of the object.
getter/setter pairinherited
hasChildren ↔ bool
The checker for block children.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
id ↔ String
The block id.
getter/setter pairoverride
isBulletedItem → bool
Returns true if is a Bulleted block.
no setter
isChild → bool
Returns true if is a Child block.
no setter
isHeading → bool
Returns true if is a Heading block.
no setter
isNone → bool
Returns true if is none block.
no setter
isNumberedItem → bool
Returns true if is a Numbered block.
no setter
isParagraph → bool
Returns true if is a Paragraph block.
no setter
isToDo → bool
Returns true if is a ToDo block.
no setter
isToogle → bool
Returns true if is a Toogle block.
no setter
jsonContent ↔ Map<String, dynamic>
The json representation for the content of the block.
getter/setter pair
lastEditedTime ↔ String
The last edited time of the object.
getter/setter pairinherited
object ↔ ObjectTypes
The type of object. Always Block for this.
finalgetter/setter pairinherited-setteroverride-getter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strObject → String
The string value for this object type.
no setteroverride
strType → String
The string value for this block type.
no setter
type ↔ BlockTypes
The block type
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBaseProperties({required String createdTime, required String lastEditedTime}) → void
Set the createdTime and the lastEditedTime properties.
inherited
toJson() → Map<String, dynamic>
Convert this to a valid json representation for the Notion API.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromListJson(List json) → List<Block>
Map a list of blocks from a json list with dynamics.