Chat class

Chat (direct, group, task) representation.

Annotations
  • @freezed

Constructors

Chat({@JsonKey(name: 'jid') required String jid, @JsonKey(name: 'chat_type') required String chatType, @JsonKey(name: 'base_gentime') int? baseGentime, @JsonKey(name: 'gentime') required int gentime, @JsonKey(name: 'created') @DateTimeConverter() required DateTime created, @JsonKey(name: 'display_name') required String displayName, @JsonKey(name: 'icons') required IconData icons, @Default(false) @JsonKey(name: 'counters_enabled') bool? countersEnabled, @Default(false) @JsonKey(name: 'can_call') bool? canCall, @Default(false) @JsonKey(name: 'can_send_message') bool? canSendMessage, @JsonKey(name: 'cant_send_message_reason') String? cantSendMessageReason, @Default(false) @JsonKey(name: 'collapsed') bool? collapsed, @JsonKey(name: 'draft') String? draft, @JsonKey(name: 'draft_gentime') int? draftGentime, @Default(false) @JsonKey(name: 'hidden') bool? hidden, @Default(false) @JsonKey(name: 'notifications_enabled') bool? notificationsEnabled, @JsonKey(name: 'num_importants') int? numImportants, @JsonKey(name: 'num_unread') int? numUnread, @JsonKey(name: 'num_unread_notices') int? numUnreadNotices, @JsonKey(name: 'last_message') Message? lastMessage, @JsonKey(name: 'last_read_message_id') String? lastReadMessageId, @JsonKey(name: 'section') String? section, @JsonKey(name: 'changeable_fields') List<String>? changeableFields, @Default(false) @JsonKey(name: 'pinned') bool? pinned, @JsonKey(name: 'pinned_sort_ordering') int? pinnedSortOrdering, @JsonKey(name: 'num_members') int? numMembers, @Default(false) @JsonKey(name: 'can_delete') bool? canDelete, @JsonKey(name: 'description') String? description, @JsonKey(name: 'markup') List<MarkupEntity>? markup, @Default(false) @JsonKey(name: 'feed') bool? feed, @JsonKey(name: 'pinned_message') Message? pinnedMessage, @JsonKey(name: 'color_index') int? colorIndex, @JsonKey(name: 'num_items') int? numItems, @JsonKey(name: 'num_checked_items') int? numCheckedItems, @JsonKey(name: 'assignee') String? assignee, @JsonKey(name: 'num') int? num, @JsonKey(name: 'observers') List<String>? observers, @JsonKey(name: 'owner') String? owner, @JsonKey(name: 'task_status') String? taskStatus, @JsonKey(name: 'title') String? title, @JsonKey(name: 'done') @DateTimeConverter() DateTime? done, @JsonKey(name: 'done_reason') String? doneReason, @JsonKey(name: 'deadline') @DateTimeConverter() DateTime? deadline, @Default(false) @JsonKey(name: 'deadline_expired') bool? deadlineExpired, @JsonKey(name: 'links') MessageLink? links, @JsonKey(name: 'tags') List<String>? tags, @JsonKey(name: 'importance') int? importance, @JsonKey(name: 'urgency') int? urgency, @JsonKey(name: 'spent_time') int? spentTime, @JsonKey(name: 'complexity') int? complexity, @JsonKey(name: 'linked_messages') List? linkedMessages, @JsonKey(name: 'uploads') List<Upload>? uploads, @JsonKey(name: 'items') List<TaskItem>? items, @JsonKey(name: 'parents') List<Subtask>? parents, @JsonKey(name: 'tabs') List<String>? tabs, @JsonKey(name: 'status') String? status, @JsonKey(name: 'members') List<GroupMembership>? members, @Default(false) @JsonKey(name: 'can_add_member') bool? canAddMember, @Default(false) @JsonKey(name: 'can_remove_member') bool? canRemoveMember, @Default(false) @JsonKey(name: 'can_change_member_status') bool? canChangeMemberStatus, @Default(false) @JsonKey(name: 'can_change_settings') bool? canChangeSettings, @Default(false) @JsonKey(name: 'default_for_all') bool? defaultForAll, @Default(false) @JsonKey(name: 'readonly_for_members') bool? readonlyForMembers, @JsonKey(name: 'autocleanup_age') int? autocleanupAge, @Default(false) @JsonKey(name: 'public') bool? isPublic, @Default(false) @JsonKey(name: 'can_join') bool? canJoin, @Default(false) @JsonKey(name: 'can_delete_any_message') bool? canDeleteAnyMessage, @Default(false) @JsonKey(name: 'can_set_important_any_message') bool? canSetImportantAnyMessage, @JsonKey(name: 'last_activity') @DateTimeConverter() DateTime? lastActivity, @Deprecated('Deprecated.') @JsonKey(name: 'draft_num') int? draftNum})
const
factory
Chat.fromJson(Map<String, dynamic> json)
factory

Properties

assignee String?
Assignee contact id. Tasks only.
no setterinherited
autocleanupAge int?
Delete messages in this chat in seconds. Experimental function.
no setterinherited
baseGentime int?
Base fields (not related to concrete participant) version.
no setterinherited
canAddMember bool?
Can I add member to this group chat.
no setterinherited
canCall bool?
Can I call to this chat.
no setterinherited
canChangeMemberStatus bool?
Can I change member status in this group chat.
no setterinherited
canChangeSettings bool?
deprecated: use changeable fields.
no setterinherited
canDelete bool?
Can I delete this chat.
no setterinherited
canDeleteAnyMessage bool?
Can I delete any message in this chat.
no setterinherited
canJoin bool?
Can I join to this public group/task.
no setterinherited
canRemoveMember bool?
Can I remove member from this group chat.
no setterinherited
canSendMessage bool?
Can I send message to this chat.
no setterinherited
canSetImportantAnyMessage bool?
Can I change Important flag in any message in this chat.
no setterinherited
cantSendMessageReason String?
Why I can't send message to this chat (if can't).
no setterinherited
changeableFields List<String>?
List of editable fields.
no setterinherited
chatType String
Chat type.
no setterinherited
collapsed bool?
Description collapsed. Used for tasks only.
no setterinherited
colorIndex int?
Custom color index from table of colors. Tasks only.
no setterinherited
complexity int?
Task complexity, number.
no setterinherited
copyWith → $ChatCopyWith<Chat>
no setterinherited
countersEnabled bool?
Include unread messages to counters.
no setterinherited
created DateTime
Creation date, iso datetime.
no setterinherited
deadline DateTime?
Task deadline in iso format, if any.
no setterinherited
deadlineExpired bool?
Is task deadline expired.
no setterinherited
defaultForAll bool?
Any new team member will be added to this group chat.
no setterinherited
description String?
Group or task description.
no setterinherited
displayName String
Title.
no setterinherited
done DateTime?
Task done date in iso format, if any.
no setterinherited
doneReason String?
Task done reason, if any.
no setterinherited
draft String?
Last message draft, if any.
no setterinherited
draftGentime int?
Last message draft version, if any.
no setterinherited
draftNum int?
Deprecated.
no setterinherited
feed bool?
Present in feed (main screen).
no setterinherited
gentime int
Chat fields related to concrete participant) version.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hidden bool?
Hidden chat.
no setterinherited
icons IconData
Icons info.
no setterinherited
importance int?
Task importance, if available in team.
no setterinherited
isPublic bool?
Can other team member see this task/group chat.
no setterinherited
items List<TaskItem>?
Checklist items. Task only.
no setterinherited
jid String
Group/Task/Contact id.
no setterinherited
lastActivity DateTime?
Date of the last message sent even if it was deleted.
no setterinherited
lastMessage Message?
Last message object.
no setterinherited
lastReadMessageId String?
Last read message id, if any.
no setterinherited
linkedMessages List?
Used for "Create task from messages...".
no setterinherited
Links in description.
no setterinherited
markup List<MarkupEntity>?
Markup entities for description field. Experimental.
no setterinherited
members List<GroupMembership>?
Group chat members.
no setterinherited
notificationsEnabled bool?
Push notifications enabled.
no setterinherited
num int?
Task number in this team.
no setterinherited
numCheckedItems int?
Checked items in checklist. Tasks only.
no setterinherited
numImportants int?
Number of important messages.
no setterinherited
numItems int?
Items in checklist. Tasks only.
no setterinherited
numMembers int?
Non-archive participants number.
no setterinherited
numUnread int?
Unread counter.
no setterinherited
numUnreadNotices int?
Mentions (@) counter.
no setterinherited
observers List<String>?
Task followers id's. TODO: rename to "followers".
no setterinherited
owner String?
Task creator.
no setterinherited
parents List<Subtask>?
Parent tasks.
no setterinherited
pinned bool?
Is chat pinned on top.
no setterinherited
pinnedMessage Message?
Pinned message for this chat.
no setterinherited
pinnedSortOrdering int?
Sort ordering for pinned chat.
no setterinherited
readonlyForMembers bool?
Readonly for non-admins group chat (Like Channels in Telegram but switchable).
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
section String?
Project / section id, if any.
no setterinherited
spentTime int?
Task spent time, number.
no setterinherited
status String?
My status in group chat.
no setterinherited
tabs List<String>?
Tab names.
no setterinherited
tags List<String>?
Task tags list, if any.
no setterinherited
taskStatus String?
Task status. May be custom.
no setterinherited
title String?
Task title. Generated from number and description.
no setterinherited
uploads List<Upload>?
Upload uids for request, upload objects for response.
no setterinherited
urgency int?
Task urgency, if available in team.
no setterinherited

Methods

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

Operators

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