BlockContent class

Constructors

BlockContent({List<RichTextObject> richText = const [], String? language, bool? checked, String? icon, String? color, String? url, String? caption, String? altText, String? embedUrl, List<List<RichTextObject>> cells = const [], String? expression})
Returns a new BlockContent instance.

Properties

altText ↔ String?
Screen-reader description for media blocks. Distinct from caption (visible to readers) — required for accessible notes when the image conveys meaning.
getter/setter pair
caption ↔ String?
Visible caption for media blocks.
getter/setter pair
cells ↔ List<List<RichTextObject>>
2D rich-text grid for table and table_row blocks.
getter/setter pair
checked ↔ bool?
Toggle state for to_do blocks.
getter/setter pair
color ↔ String?
Theme color for callout blocks.
getter/setter pair
embedUrl ↔ String?
Source URL for embed blocks.
getter/setter pair
expression ↔ String?
TeX/MathJax expression for equation blocks.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
icon ↔ String?
Emoji or short string for callout blocks.
getter/setter pair
language ↔ String?
Programming language for code blocks.
getter/setter pair
richText ↔ List<RichTextObject>
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
url ↔ String?
Source URL for image, video, file blocks.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(dynamic value) → BlockContent?
Returns a new BlockContent instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<BlockContent>
mapFromJson(dynamic json) → Map<String, BlockContent>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<BlockContent>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.