BlockItemDescriptor class final
Descriptor for configuring block types that can be used within portable text.
Each block type needs:
- A type descriptor for serialization
- A builder function to render the block
Example:
final cardBlock = BlockItemDescriptor(
type: Card.typeDescriptor,
builder: (context, content) =>
vyuh.content.buildContent(context, content as Card),
);
Constructors
-
BlockItemDescriptor.new({required TypeDescriptor<
PortableBlockItem> type, required BlockWidgetBuilder builder})
Properties
Methods
-
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