Channel constructor
const
Channel({
- required int id,
- required String name,
- required String uuid,
- required String state,
- @JsonKey(name: 'is_minimized') required bool isMinimized,
- @JsonKey(name: 'channel_type') required String channelType,
- @JsonKey(name: 'group_based_subscription') required bool groupBasedSubscription,
- @JsonKey(name: 'create_uid') required int createUid,
- @JsonKey(name: 'message_needaction_counter') required int messageNeedactionCounter,
- @JsonKey(name: 'message_unread_counter') required int messageUnreadCounter,
- @JsonKey(name: 'is_pinned') required bool isPinned,
- @JsonKey(name: 'last_message_id', fromJson: Channel.parseIntNullable) int? lastMessageId,
- @JsonKey(name: 'seen_message_id', fromJson: Channel.parseIntNullable) int? seenMessageId,
Implementation
const factory Channel({
required int id,
required String name,
required String uuid,
required String state,
@JsonKey(name: 'is_minimized') required bool isMinimized,
@JsonKey(name: 'channel_type') required String channelType,
@JsonKey(name: 'group_based_subscription')
required bool groupBasedSubscription,
@JsonKey(name: 'create_uid') required int createUid,
@JsonKey(name: 'message_needaction_counter')
required int messageNeedactionCounter,
@JsonKey(name: 'message_unread_counter') required int messageUnreadCounter,
@JsonKey(name: 'is_pinned') required bool isPinned,
@JsonKey(name: 'last_message_id', fromJson: Channel.parseIntNullable)
int? lastMessageId,
@JsonKey(name: 'seen_message_id', fromJson: Channel.parseIntNullable)
int? seenMessageId,
}) = _Channel;