ChatState constructor

const ChatState({
  1. ChatPhase phase = ChatPhase.idle,
  2. HatangConnectionState connection = HatangConnectionState.disconnected,
  3. SiteConfig? config,
  4. VisitorDto? visitor,
  5. ConversationSummary? conversation,
  6. Timeline timeline = Timeline.empty,
  7. List<PendingMessage> pending = const [],
  8. String? typingAgent,
  9. Availability availability = Availability.offline,
  10. int unread = 0,
  11. HatangLocale locale = HatangLocale.vi,
  12. bool needsEmail = false,
  13. bool skippedEmail = false,
  14. int? rated,
  15. HatangException? transientError,
  16. String? outdatedReason,
  17. String? visitorEmail,
  18. String? visitorName,
  19. bool loadingEarlier = false,
  20. bool visible = false,
  21. bool foreground = true,
  22. String? draft,
})

Creates a state.

Implementation

const ChatState({
  this.phase = ChatPhase.idle,
  this.connection = HatangConnectionState.disconnected,
  this.config,
  this.visitor,
  this.conversation,
  this.timeline = Timeline.empty,
  this.pending = const [],
  this.typingAgent,
  this.availability = Availability.offline,
  this.unread = 0,
  this.locale = HatangLocale.vi,
  this.needsEmail = false,
  this.skippedEmail = false,
  this.rated,
  this.transientError,
  this.outdatedReason,
  this.visitorEmail,
  this.visitorName,
  this.loadingEarlier = false,
  this.visible = false,
  this.foreground = true,
  this.draft,
});