PensilPostFeedListView constructor

const PensilPostFeedListView({
  1. Key? key,
  2. OnHashtagTap? onHashtagTap,
  3. OnMentionTap? onMentionTap,
  4. OnUserTap? onUserTap,
  5. PostFooterBuilder? postFooterBuilder,
  6. PostContentBuilder? postContentBuilder,
  7. PostHeaderBuilder? postHeaderBuilder,
  8. required String sectionId,
  9. PostBuilder? postBuilder,
  10. Widget onProgressWidget = const ProgressStateWidget(),
  11. Widget onErrorWidget = const ErrorStateWidget(),
  12. Widget onEmptyWidget = const EmptyStateWidget(message: 'No post to display'),
  13. OnPostTap? onPostTap,
  14. TransitionType transitionType = TransitionType.material,
  15. ScrollPhysics? scrollPhysics,
})

Display a list of post. postFooterBuilder is a builder for the footer of the post.

postHeaderBuilder is a builder for the header of the post.

postContentBuilder is a builder for the body of the post.

postBuilder is a builder for complete post.

onPostTap is a callback for when a post is tapped.

onUserTap is a callback for when a user avatar is tapped.

Implementation

const PensilPostFeedListView({
  Key? key,
  this.onHashtagTap,
  this.onMentionTap,
  this.onUserTap,
  this.postFooterBuilder,
  this.postContentBuilder,
  this.postHeaderBuilder,
  required this.sectionId,
  this.postBuilder,
  this.onProgressWidget = const ProgressStateWidget(),
  this.onErrorWidget = const ErrorStateWidget(),
  this.onEmptyWidget = const EmptyStateWidget(message: 'No post to display'),
  this.onPostTap,
  this.transitionType = TransitionType.material,
  this.scrollPhysics,
}) : super(key: key);