AgentInfo class
Public information about a support agent — either the one assigned to
the active conversation, or a member of the currently-online agent
pool surfaced via ChataptorClient.currentOnlineAgents.
- Annotations
-
- @immutable
Constructors
- AgentInfo({required int id, required String name, String? avatarUrl, AgentInitials? initials})
-
Creates an AgentInfo.
const
-
AgentInfo.fromJson(Map<
String, dynamic> json) -
Parses a single agent entry as carried on the
agent:availablePhoenix event (also used in the assigned-agent payload on the conversation channel). Tolerates bothintandStringIDs.factory
Properties
- avatarUrl → String?
-
URL of the agent's avatar image, if any.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → int
-
Server-assigned agent ID.
final
- initials → AgentInitials?
-
Fallback initials to render when avatarUrl is null or fails to load.
final
- name → String
-
Agent's display name shown to the customer.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{int? id, String? name, String? avatarUrl, AgentInitials? initials}) → AgentInfo - Returns a copy with the given fields overridden.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override