GroupChannel constructor
GroupChannel({
- BaseMessage? lastMessage,
- bool isSuper = false,
- bool isStrict = false,
- bool isBroadcast = false,
- bool isPublic = false,
- bool isDistinct = false,
- bool isDiscoverable = false,
- bool isExclusive = false,
- bool accessCodeRequired = false,
- int unreadMessageCount = 0,
- int unreadMentionCount = 0,
- List<
Member> members = const [], - int memberCount = 0,
- int joinedMemberCount = 0,
- int joinedAt = 0,
- GroupChannelPushTriggerOption myPushTriggerOption = GroupChannelPushTriggerOption.all,
- MemberState myMemberState = MemberState.none,
- Role myRole = Role.none,
- MuteState myMutedState = MuteState.unmuted,
- CountPreference myCountPreference = CountPreference.all,
- int invitedAt = 0,
- Member? inviter,
- bool isHidden = false,
- int myLastRead = 0,
- int? messageOffsetTimestamp,
- int messageSurvivalSeconds = -1,
- required String channelUrl,
- String? name,
- String? coverUrl,
- User? creator,
- int? createdAt,
- String? data,
- String? customType,
- bool isFrozen = false,
- bool isEphemeral = false,
- BaseMessage? lastPinnedMessage,
- int pinnedMessagesUpdatedAt = 0,
WARNING: Do not use default constructor to initialize manually
Implementation
GroupChannel({
this.lastMessage,
this.isSuper = false,
this.isStrict = false,
this.isBroadcast = false,
this.isPublic = false,
this.isDistinct = false,
this.isDiscoverable = false,
this.isExclusive = false,
this.accessCodeRequired = false,
this.unreadMessageCount = 0,
this.unreadMentionCount = 0,
this.members = const [],
this.memberCount = 0,
this.joinedMemberCount = 0,
this.joinedAt = 0,
this.myPushTriggerOption = GroupChannelPushTriggerOption.all,
this.myMemberState = MemberState.none,
this.myRole = Role.none,
this.myMutedState = MuteState.unmuted,
this.myCountPreference = CountPreference.all,
this.invitedAt = 0,
this.inviter,
this.isHidden = false,
this.hiddenState = GroupChannelHiddenState.unhidden,
this.myLastRead = 0,
this.messageOffsetTimestamp,
this.messageSurvivalSeconds = -1,
required String channelUrl,
String? name,
String? coverUrl,
User? creator,
int? createdAt,
String? data,
String? customType,
bool isFrozen = false,
bool isEphemeral = false,
this.lastPinnedMessage,
this.pinnedMessagesUpdatedAt = 0,
}) : super(
channelUrl: channelUrl,
name: name,
coverUrl: coverUrl,
creator: creator,
createdAt: createdAt,
data: data,
customType: customType,
isFrozen: isFrozen,
isEphemeral: isEphemeral,
fromCache: false,
dirty: false,
) {
//If exclusive [isSuper] and [isBroadcast] are true
if (isExclusive == true) {
isSuper = true;
isBroadcast = true;
}
}