LMFeedCommentReplyWidget
LMFeedCommentReplyWidget
is a widget designed to display replies for a specific comment in a post within your Flutter application. It integrates with the bloc architecture to manage state and provides seamless interaction capabilities like replying, liking, and editing replies. Developers can customize the appearance and behavior of the widget using various builder functions.
Properties
postId (String)
The ID of the post to which the comment and its replies belong. This is a required parameter.comment (LMCommentViewData)
The comment object for which replies are displayed. This is a required parameter.user (LMUserViewData)
The user who posted the comment. This is a required parameter.style (LMFeedCommentStyle?)
An optional style object to customize the appearance of the reply widget.commentBuilder (LMFeedPostCommentBuilder?)
A builder function to customize the appearance of individual comments and replies.loaderBuilder (LMFeedLoaderBuilder?)
A builder function to customize the loading indicator when fetching replies.post (LMPostViewData)
The post object to which the comment and replies belong. This is a required parameter.
copyWith (LMFeedCommentReplyWidget)
The copyWith
method allows you to create a new instance of LMFeedCommentReplyWidget
by overriding specific properties, while retaining the current values for the rest.
Usage
LMFeedCommentReplyWidget copyWith({
String? postId,
LMCommentViewData? reply,
LMUserViewData? user,
LMFeedCommentStyle? style,
LMFeedPostCommentBuilder? commentBuilder,
LMPostViewData? post,
LMFeedLoaderBuilder? loaderBuilder,
});
Usage Example
Here is an example demonstrating how to use LMFeedCommentReplyWidget
with custom comment builders and loading indicators.
Code Example
LMFeedCommentReplyWidget(
commentBuilder:
widget.commentBuilder ?? LMFeedCore.widgetUtility.commentBuilder,
post: _postViewData!,
postId: widget.postId,
comment: commentViewData,
user: userViewData,
);