GenericInteraction class
Generic interaction for common use cases with Map-based data.
Use this for simple interactions where you don't need typed payloads. The data is stored as a Map<String, dynamic> which can contain any JSON-serializable values.
Example:
final interaction = GenericInteraction(
  id: 'create_user',
  data: {
    'name': 'John Doe',
    'email': 'john@example.com',
    'age': 30,
  },
  timeout: Duration(seconds: 10),
  tags: {'user', 'create'},
);
- Inheritance
- 
    - Object
- InteractionDefinition
- GenericInteraction
 
Constructors
- 
          GenericInteraction({required String id, required Map<String, dynamic> data, InteractionDefinition? rollback, Duration? timeout, bool supportsOptimistic = true, int priority = 0, Set<String> tags = const {}})
- Creates a new generic interaction.
- 
          GenericInteraction.fromJson(Map<String, dynamic> json)
- 
          Creates a GenericInteraction from JSON data.
            factory
Properties
- 
  data
  → Map<String, dynamic> 
- 
  The interaction data as a map.
  final
- hashCode → int
- 
  The hash code for this object.
  no setteroverride
- id → String
- 
  Unique identifier for this interaction type.
  final
- payload → Object?
- 
  Gets the payload object (if any) for class-based interactions.
  no setterinherited
- payloadType → Type?
- 
  Gets the payload type for type checking.
  no setterinherited
- priority → int
- 
  Priority level for execution order (higher = more priority).
  final
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
- supportsOptimistic → bool
- 
  Whether this interaction supports optimistic updates.
  final
- 
  Tags for categorizing interactions.
  final
- timeout → Duration?
- 
  Timeout duration for the interaction (optional).
  final
Methods
- 
  createRollback() → InteractionDefinition? 
- 
  Creates a rollback interaction (optional).
  override
- 
  getValidationErrors() → List< String> 
- 
  Gets validation error messages.
  override
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  toJson() → Map< String, dynamic> 
- 
  Serializes the interaction data to JSON format.
  override
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
- 
  validate() → bool 
- 
  Validates the interaction data.
  override
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  override