ChatState constructor
- ChatPhase phase = ChatPhase.idle,
- HatangConnectionState connection = HatangConnectionState.disconnected,
- SiteConfig? config,
- VisitorDto? visitor,
- ConversationSummary? conversation,
- Timeline timeline = Timeline.empty,
- List<
PendingMessage> pending = const [], - String? typingAgent,
- Availability availability = Availability.offline,
- int unread = 0,
- HatangLocale locale = HatangLocale.vi,
- bool needsEmail = false,
- bool skippedEmail = false,
- int? rated,
- HatangException? transientError,
- String? outdatedReason,
- String? visitorEmail,
- String? visitorName,
- bool loadingEarlier = false,
- bool visible = false,
- bool foreground = true,
- 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,
});