搜索分类、插件与代码仓

插件详情v2.0.0

reels_viewer

这是一个以 Instagram Reels 浏览器风格创建的包,您可以传入视频 URL 并获得 Reels 视图。

AndroidiOSWebmacOS
近 30 天下载
416
喜欢数
37
Pub 分数
130

安装插件

flutter pub add reels_viewer

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

reels_viewer 包使开发者能够将其 Flutter 应用程序集成 Instagram Reels 风格的视频查看器。通过提供视频 URL,用户可以享受全屏、可滑动的视频体验,播放流畅且控制直观。专为社交媒体应用设计,支持 Android、iOS、Web 和 macOS 等多个平台,跨设备提供一致的用户体验。该包轻量且易于实现,非常适合注重吸引用户观看视频的内容密集型应用程序。

适合场景

  • 社交媒体应用
  • 视频内容平台
  • 应用内视频画廊
  • 用户生成内容 feeds
  • 互动叙事功能

主要特点

  • Instagram Reels 启发的用户界面
  • 可滑动的视频导航
  • 对视频 URL 的支持
  • 跨平台兼容性
  • 流畅的播放性能

适合对象

  • 开发社交媒体应用的开发者
  • 专注于视频内容的应用程序
  • 创作者寻求沉浸式视频体验
  • 视频观众需要最少设置的项目
  • 针对多个平台的团队

使用建议

  • 需要有效的视频URL
  • 有限的自定义选项
  • 依赖外部视频托管
  • 未针对长视频优化
  • 可能需要额外的样式来体现品牌特色

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

reels_viewer

This is a package created in the style of the instagram reels viewer, with which you can pass video url and get reels view.

Usage

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  reels_viewer: ^1.0.0

In your library add the following import:

import 'package:reels_viewer/reels_viewer.dart';

For help getting started with Flutter, view the online documentation.

Example

Initializing a List

List<ReelModel> reelsList = [
    ReelModel(
        'https://assets.mixkit.co/videos/preview/mixkit-tree-with-yellow-flowers-1173-large.mp4',
        'Darshan Patil',
        likeCount: 2000,
        isLiked: true,
        musicName: 'In the name of Love',
        reelDescription: "Life is better when you're laughing.",
        profileUrl:
        'https://opt.toiimg.com/recuperator/img/toi/m-69257289/69257289.jpg',
        commentList: [
            ReelCommentModel(
                comment: 'Nice...',
                userProfilePic:
                'https://opt.toiimg.com/recuperator/img/toi/m-69257289/69257289.jpg',
                userName: 'Darshan',
                commentTime: DateTime.now(),
            ),
            ReelCommentModel(
                comment: 'Superr...',
                userProfilePic:
                'https://opt.toiimg.com/recuperator/img/toi/m-69257289/69257289.jpg',
                userName: 'Darshan',
                commentTime: DateTime.now(),
            ),
            ReelCommentModel(
                comment: 'Great...',
                userProfilePic:
                'https://opt.toiimg.com/recuperator/img/toi/m-69257289/69257289.jpg',
                userName: 'Darshan',
                commentTime: DateTime.now(),
            ),
        ]
    ),
    ReelModel(
        'https://assets.mixkit.co/videos/preview/mixkit-father-and-his-little-daughter-eating-marshmallows-in-nature-39765-large.mp4',
        'Rahul',
        musicName: 'In the name of Love',
        reelDescription: "Life is better when you're laughing.",
        profileUrl:
        'https://opt.toiimg.com/recuperator/img/toi/m-69257289/69257289.jpg',
    ),
    ReelModel(
        'https://assets.mixkit.co/videos/preview/mixkit-mother-with-her-little-daughter-eating-a-marshmallow-in-nature-39764-large.mp4',
        'Rahul',
    ),
];

Simple implementation

ReelsViewer(
    reelsList: reelsList,
    appbarTitle: 'Instagram Reels',
    onShare: (url) {
        log('Shared reel url ==> $url');
    },
    onLike: (url) {
        log('Liked reel url ==> $url');
    },
    onFollow: () {
        log('======> Clicked on follow <======');
    },
    onComment: (comment) {
        log('Comment on reel ==> $comment');
    },
    onClickMoreBtn: () {
        log('======> Clicked on more option <======');
    },
    onClickBackArrow: () {
        log('======> Clicked on back arrow <======');
    },
    onIndexChanged: (index){
        log('======> Current Index ======> $index <========');
    },
    showProgressIndicator: true,
    showVerifiedTick: false,
    showAppbar: false,
);

Options

Name Description Default Return
reelsList For assign reels list [] -
appbarTitle For assign appbar title Reels View -
showProgressIndicator Hide/Show progress Indicator true -
showVerifiedTick Hide/Show profile verified tick true -
showAppbar Hide/Show appbar true -
onShare Trigger when click on Share btn - reels url
onLike Trigger when click on Like btn - reels url
onFollow Trigger when click on Follow btn - -
onComment Trigger when click on Comment Bnt - string
onClickMoreBtn Trigger when click on Three dot btn - -
onClickBackArrow Trigger when click on Back Arrow - -
onIndexChanged Trigger when Reel change - current reel index

Demo APK

Click here for download demo app.

ScreenShots

initial view

Screenshot 1

Screenshot 2

Screenshot 3

Demo video

Click here for watch demo video.

所属分类

依赖

依赖清单 5 项

源码仓库

使用此插件的项目

暂无相关数据。