Skip to main content

LMFeedVerticalVideoPost

LMFeedVerticalVideoPost is a widget designed to display vertical video posts in your Flutter application. It supports customization through various builder functions, allowing developers to tailor the appearance and functionality of video posts. This widget enables engagement actions like likes, comments, and menu options while offering full styling flexibility.


Properties

  • postViewData (LMPostViewData)
    Contains details about the video post, including the video URL, title, description, and metadata. (Required)

  • widgetSource (LMFeedWidgetSource) (Default: LMFeedWidgetSource.videoFeed)
    Specifies the source screen where the post is being displayed (e.g., main feed, profile).

  • videoBuilder (LMFeedVideoBuilder?)
    A builder function to customize how the video widget is displayed.

  • postHeaderBuilder (LMFeedPostHeaderBuilder?)
    A builder function to customize the post header, which typically includes the username, timestamp, and profile picture.

  • postContentBuilder (LMFeedPostContentBuilder?)
    A builder function to customize the post content, including text, media, and other elements.

  • postTopicBuilder (LMFeedPostTopicBuilder?)
    A builder function to customize how topics or hashtags associated with the post are displayed.

  • postMenuBuilder (LMFeedPostMenuBuilder?)
    A builder function to customize the post menu, which usually includes options like report, delete, or share.

  • postLikeButtonBuilder (LMFeedButtonBuilder?)
    A builder function to customize the like button for the post.

  • postCommentButtonBuilder (LMFeedButtonBuilder?)
    A builder function to customize the comment button for the post.

  • preActionWidgets (List<Widget>) (Default: [])
    A list of widgets to display before the action buttons.

  • postActionWidgets (List<Widget>) (Default: [])
    A list of widgets to display after the action buttons.

  • style (LMFeedVerticalVideoPostStyle?)
    Allows customization of styles such as colors, fonts, and layouts for the vertical video post.*


copyWith (LMFeedVerticalVideoPost)

The copyWith method creates a new instance of LMFeedVerticalVideoPost with updated values while retaining the current values for fields not overridden.

Usage

LMFeedVerticalVideoPost copyWith({
LMPostViewData? postViewData,
LMFeedWidgetSource? widgetSource,
LMFeedVideoBuilder? videoBuilder,
LMFeedPostHeaderBuilder? postHeaderBuilder,
LMFeedPostContentBuilder? postContentBuilder,
LMFeedPostTopicBuilder? postTopicBuilder,
LMFeedPostMenuBuilder? postMenuBuilder,
LMFeedButtonBuilder? postLikeButtonBuilder,
LMFeedButtonBuilder? postCommentButtonBuilder,
List<Widget>? preActionWidgets,
List<Widget>? postActionWidgets,
LMFeedVerticalVideoPostStyle? style,
});

Usage Example

Below is an example demonstrating how to use LMFeedVerticalVideoPost with custom builders for the video, post header, and comment button.

Code Example

LMFeedVerticalVideoPost(
postViewData: postViewData,
widgetSource: LMFeedWidgetSource.feed,
preActionWidgets: [
Icon(Icons.favorite_border),
],
postActionWidgets: [
Icon(Icons.share),
],
);

Summary

The LMFeedVerticalVideoPost widget provides a fully customizable interface for displaying vertical video posts in a social feed.
By leveraging builder functions and styling properties, developers can modify the appearance and behavior of video posts to match specific application requirements.