WhatsappChatSummary class

A light, serialisable view of a chat, group or channel -- enough to show it in a picker and to send to it. Pass id as the phone of any send method.

Constructors

WhatsappChatSummary({required String id, required String name, required WhatsappChatKind kind, int? memberCount, bool announce = false, bool? isAdmin, String? role})
const
WhatsappChatSummary.fromJson(Map<String, dynamic> json)
factory

Properties

announce → bool
Group: only admins may post. Always false for chats and channels.
final
canPost → bool
Best guess at whether a send from this account will be accepted. Unknown admin state counts as allowed; WhatsApp still has the final word.
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → String
The full chat id, e.g. 1203...@g.us or 1203...@newsletter.
final
isAdmin → bool?
Group: whether this account is an admin, when WhatsApp exposes it.
final
kind → WhatsappChatKind
final
memberCount → int?
Group: members count. Channel: subscribers when WhatsApp has loaded it.
final
name → String
final
role → String?
Channel: this account's role -- owner, admin, subscriber or guest, when WhatsApp exposes it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

parseList(dynamic data) → List<WhatsappChatSummary>