StructuredState<TState, TEvent> constructor

StructuredState<TState, TEvent>({
  1. required TState state,
  2. TEvent? lastEvent,
  3. DateTime? timestamp,
  4. List<TEvent>? eventHistory,
})

Implementation

StructuredState({
  required this.state,
  this.lastEvent,
  DateTime? timestamp,
  List<TEvent>? eventHistory,
})  : timestamp = timestamp ?? DateTime.now(),
      eventHistory = eventHistory ?? [];