BaseBlock class
Constructors
Properties
- blockType → String
-
Block Type
final
-
children
↔ List<
BaseBlock> ? -
getter/setter pair
-
data
→ Map<
String, dynamic> -
Block's data. Usually is image's src
final
- decoration → TextDecoration
-
Get decoration for each block based on their
inline styles
no setter - depth → int
-
Draft js property
final
- end → int
-
block's end
final
-
entityTypes
→ List<
String> -
Entity type
final
- fontStyle → FontStyle
-
Get fontstyle for each block based on their
inline styles
no setter - fontWeight → FontWeight
-
Get fontweight for each block based on their
inline styles
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
inlineStyles
→ List<
String> -
Inline styles
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → int
-
Block's start
final
- text → String
-
Text content
final
- textContent → String
-
Get text content based on the start and end
no setter
Methods
-
addData(
Map< String, dynamic> data) → Map<String, dynamic> - Add data to the block
-
addEntityType(
String? entity) → List< String> - Add entity type to the block
-
addStyle(
String? style) → List< String> - Add inline style to the block
-
copyWith(
{BaseBlock? block}) → BaseBlock -
getBlock(
BaseBlock block, List< BasePlugin> plugins) → BaseBlock - get block from plugins' rendering map If no match, then use default
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
BuildContext context, {List< InlineSpan> ? children}) → InlineSpan - Render the current block
-
renderStyle(
BuildContext context) → TextStyle - Render style based on the block's type and inline styles
-
split(
{required int start, required int end, String? style, String? entity, required Map< String, dynamic> data, required List<BasePlugin> plugins, int? depth}) → List<BaseBlock> - Apply inline styles or entity data to the block
-
toString(
) → String -
A string representation of this object.
inherited
-
withinRange(
int start, int end) → bool - If the range within the current block's range
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited