Channel constructor

const Channel({
  1. required int id,
  2. required String name,
  3. required String uuid,
  4. required String state,
  5. @JsonKey(name: 'is_minimized') required bool isMinimized,
  6. @JsonKey(name: 'channel_type') required String channelType,
  7. @JsonKey(name: 'group_based_subscription') required bool groupBasedSubscription,
  8. @JsonKey(name: 'create_uid') required int createUid,
  9. @JsonKey(name: 'message_needaction_counter') required int messageNeedactionCounter,
  10. @JsonKey(name: 'message_unread_counter') required int messageUnreadCounter,
  11. @JsonKey(name: 'is_pinned') required bool isPinned,
  12. @JsonKey(name: 'last_message_id', fromJson: Channel.parseIntNullable) int? lastMessageId,
  13. @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;