comment/ck_comment_sheet library

Classes

CkCommentSheet<T>
A generic, recursively-nested comment/reply list with built-in expand/collapse-replies state, connector-line drawing, and pagination — built on top of CkListView for the outer scroll/refresh/load-more mechanics.

Enums

CkSendButtonPosition
Where the send button is rendered relative to the composer text box.

Typedefs

CkAvatarSizeForDepth = double Function(int depth)
Returns the avatar size to use at a given nesting depth (0 = top level).
CkCommentAvatarBuilder<T> = Widget Function(T item, int depth)
Builds the avatar for item. Fully self-contained, including its own tap handling (e.g. navigating to a profile screen) if any.
CkCommentContentBuilder<T> = Widget Function(BuildContext context, T item, int depth)
Builds everything for item except the avatar, reaction row and reply action (those are separate builders below) — typically the name/header row, the comment text and any attached media.
CkCommentReactionBuilder<T> = Widget Function(T item)
Builds the reaction control(s) for item (e.g. a like/reaction stack).
CkCommentReplyActionBuilder<T> = Widget Function(T item, int depth, VoidCallback expandReplies)
Builds the "reply" affordance for item. expandReplies is supplied by the sheet — call it from your widget's tap handler (in addition to any app-specific logic, like focusing a composer) to reveal item's replies.
CkComposerFooterBuilder = Widget Function(BuildContext context, TextEditingController controller)
Builds the composer's toolbar (e.g. a type dropdown, media pickers, an AI writer button) — everything except the send button, which the sheet places according to CkSendButtonPosition. controller is the sheet's own composer text controller, so app-specific widgets (like an AI writer) can read/write the same text.
CkIdExtractor<T> = String Function(T item)
Returns a stable, unique identifier for item. Used as the key for the internal expand/collapse state, so it must not depend on object identity (the same logical item may be represented by a new instance after a refetch).
CkRepliesExtractor<T> = List<T> Function(T item)
Returns the direct replies/children of item. Called recursively, so replies can themselves have replies — depth is not limited to 2 levels.