CkCommentSheet<T> constructor
const
CkCommentSheet<T> ({
- Key? key,
- required List<
T> items, - required CkRepliesExtractor<
T> repliesOf, - required CkIdExtractor<
T> idOf, - required CkCommentContentBuilder<
T> itemBuilder, - required CkCommentAvatarBuilder<
T> avatarBuilder, - required CkCommentReplyActionBuilder<
T> replyActionBuilder, - required CkCommentReactionBuilder<
T> reactionBuilder, - WidgetBuilder? previewHeaderBuilder,
- void onRefresh()?,
- void onLoadMore(
- int page
- void onLoadMoreReplies(
- T parent,
- int page
- bool isLoading = false,
- bool isLoadDone = false,
- int replyPageSize = 2,
- CkAvatarSizeForDepth avatarSizeForDepth = _defaultAvatarSizeForDepth,
- bool exclusiveReplyExpansion = true,
- ScrollController? scrollController,
- EdgeInsetsGeometry? padding,
- WidgetBuilder? dividerBuilder,
- double gap = 8,
- double itemBottomSpacing = 16,
- Color? accentColor,
- Color? dividerColor,
- TextStyle? toggleTextStyle,
- T? replyTarget,
- void onSend(
- String text,
- T? replyTo
- Widget sendButtonBuilder(
- VoidCallback onTap
- CkSendButtonPosition sendButtonPosition = CkSendButtonPosition.footer,
- bool showComposer = true,
- String composerHintText = 'Write a comment...',
- double composerMinHeight = 100,
- double composerFocusedHeight = 160,
- double composerMaximizedHeightFraction = 0.5,
- Color? composerBackgroundColor,
- void composerOnChanged(
- String value
- Widget composerContainerBuilder(
- BuildContext context,
- Widget textField,
- bool isFocused
- int? composerMaxLength,
- int? composerMaxWords,
- int composerMinLength = 0,
- int composerMinWords = 0,
- TextStyle? composerCounterTextStyle,
- CkMultilineHintLimitBuilder? composerLimitHintBuilder,
Implementation
const CkCommentSheet({
super.key,
required this.items,
required this.repliesOf,
required this.idOf,
required this.itemBuilder,
required this.avatarBuilder,
required this.replyActionBuilder,
required this.reactionBuilder,
this.previewHeaderBuilder,
this.onRefresh,
this.onLoadMore,
this.onLoadMoreReplies,
this.isLoading = false,
this.isLoadDone = false,
this.replyPageSize = 2,
this.avatarSizeForDepth = _defaultAvatarSizeForDepth,
this.exclusiveReplyExpansion = true,
this.scrollController,
this.padding,
this.dividerBuilder,
this.gap = 8,
this.itemBottomSpacing = 16,
this.accentColor,
this.dividerColor,
this.toggleTextStyle,
this.replyTarget,
this.onSend,
this.composerFooterBuilder,
this.sendButtonBuilder,
this.sendButtonPosition = CkSendButtonPosition.footer,
this.showComposer = true,
this.composerHintText = 'Write a comment...',
this.composerMinHeight = 100,
this.composerFocusedHeight = 160,
this.composerMaximizedHeightFraction = 0.5,
this.composerBackgroundColor,
this.composerOnChanged,
this.composerContainerBuilder,
this.composerMaxLength,
this.composerMaxWords,
this.composerMinLength = 0,
this.composerMinWords = 0,
this.composerCounterTextStyle,
this.composerLimitHintBuilder,
});