搜尋分類、套件與程式碼儲存庫

套件詳情v2.0.0

reels_viewer

這是一個以 Instagram Reels 瀏覽器風格創建的套件,您可傳入影片 URL 並取得 Reels 視圖。

AndroidiOSWebmacOS
近 30 天下載
416
喜歡數
37
Pub 分數
130

安裝套件

flutter pub add reels_viewer

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

reels_viewer 套件讓開發者能夠將 Instagram Reels 風格的影片檢視器整合至其 Flutter 應用程式中。透過提供影片 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。