FormBlock class abstract
Abstract base class for content blocks within a form document.
Use FormBlock.fromJson factory to deserialize, which dispatches to the correct subtype based on the 'type' field.
Constructors
-
FormBlock({required String blockId, required FormBlockType type, required int index, Map<
String, dynamic> ? style}) -
FormBlock.fromJson(Map<
String, dynamic> json) -
Create the appropriate FormBlock subtype from JSON.
factory
Properties
- blockId → String
-
Unique block identifier.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
Block ordering index.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
style
→ Map<
String, dynamic> ? -
Optional style properties.
final
- type → FormBlockType
-
Type of this block.
final
Methods
-
baseToJson(
) → Map< String, dynamic> - Serialize common base fields to a map.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited