ChatAdministratorRights class abstract
Represents the rights of an administrator in a chat.
- Annotations
-
- @freezed
Constructors
- ChatAdministratorRights.new({@JsonKey(name: 'is_anonymous') required bool isAnonymous, @JsonKey(name: 'can_manage_chat') required bool canManageChat, @JsonKey(name: 'can_delete_messages') required bool canDeleteMessages, @JsonKey(name: 'can_manage_video_chats') required bool canManageVideoChats, @JsonKey(name: 'can_restrict_members') required bool canRestrictMembers, @JsonKey(name: 'can_promote_members') required bool canPromoteMembers, @JsonKey(name: 'can_change_info') required bool canChangeInfo, @JsonKey(name: 'can_invite_users') required bool canInviteUsers, @JsonKey(name: 'can_post_messages') bool? canPostMessages, @JsonKey(name: 'can_edit_messages') bool? canEditMessages, @JsonKey(name: 'can_pin_messages') bool? canPinMessages, @JsonKey(name: 'can_manage_forum') bool? canManageForum, @JsonKey(name: 'can_post_stories') bool? canPostStories, @JsonKey(name: 'can_edit_stories') bool? canEditStories, @JsonKey(name: 'can_delete_stories') bool? canDeleteStories})
-
Creates a new ChatAdministratorRights object.
constfactory
-
ChatAdministratorRights.fromJson(Map<
String, dynamic> json) -
Creates a new ChatAdministratorRights object from json.
factory
Properties
- canChangeInfo → bool
-
True, if the user is allowed to change the chat title, photo and other
settings
no setterinherited
- canDeleteMessages → bool
-
True, if the administrator can delete messages of other users
no setterinherited
- canDeleteStories → bool?
-
Optional. True, if the administrator can delete stories posted by other
users
no setterinherited
- canEditMessages → bool?
-
Optional. True, if the administrator can edit messages of other users
and can pin messages; channels only
no setterinherited
- canEditStories → bool?
-
Optional. True, if the administrator can edit stories posted by other
users; channels only
no setterinherited
- canInviteUsers → bool
-
True, if the user is allowed to invite new users to the chat
no setterinherited
- canManageChat → bool
-
True, if the administrator can access the chat event log, chat
statistics, message statistics in channels, see channel members, see
anonymous administrators in supergroups and ignore slow mode. Implied by
any other administrator privilege
no setterinherited
- canManageForum → bool?
-
Optional. True, if the user is allowed to create, rename, close, and
reopen forum topics; supergroups only
no setterinherited
- canManageVideoChats → bool
-
True, if the administrator can manage video chats
no setterinherited
- canPinMessages → bool?
-
Optional. True, if the user is allowed to pin messages; groups and
supergroups only
no setterinherited
- canPostMessages → bool?
-
Optional. True, if the administrator can post in the channel; channels
only
no setterinherited
- canPostStories → bool?
-
Optional. True, if the administrator can post stories in the channel;
channels only
no setterinherited
- canPromoteMembers → bool
-
True, if the administrator can add new administrators with a subset of
their own privileges or demote administrators that he has promoted,
directly or indirectly (promoted by administrators that were appointed
by the user)
no setterinherited
- canRestrictMembers → bool
-
True, if the administrator can restrict, ban or unban chat members
no setterinherited
-
copyWith
→ $ChatAdministratorRightsCopyWith<
ChatAdministratorRights> -
Create a copy of ChatAdministratorRights
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAnonymous → bool
-
True, if the user's presence in the chat is hidden
no setterinherited
- 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> -
Serializes this ChatAdministratorRights to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited