搜尋套件、儲存庫與 APP 分類

lightbox 封面
套件詳情v0.1.0

lightbox

用於建立類似網頁應用程式的燈箱的 Flutter 插件。可用於以幻燈片覆疊層形式顯示多種類型的圖像(URL、資源檔、檔案、字節),並提供控制功能。

AndroidiOSmacOSWindowsLinux
近 30 天下載
39
喜歡數
33
Pub 分數
150

安裝套件

flutter pub add lightbox

套件介紹

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

lightbox 套件是一個 Flutter 插件,讓開發者能夠建立類似網頁的輕量級圖層覆蓋,以幻燈片格式顯示圖片。它支援多種圖片來源,包括 URL、資源、檔案與位元資料,適用於各種使用情境。透過可自訂的控制項,提升使用者在全螢幕檢視圖片時的體驗。此套件相容於多個平台,包含 Android、iOS、macOS、Windows 與 Linux,確保廣泛的覆蓋範圍。非常適合用於相簿、產品展示或任何需要沉浸式圖片瀏覽的應用。

適用情境

  • 圖像畫廊
  • 產品圖片檢視器
  • 全螢幕照片幻燈片
  • 社群媒體圖片分享
  • 文件圖像預覽

主要特色

  • 支援 URL、資產、檔案和位元組圖像來源
  • 可自訂的導航控制項
  • 跨平台相容性
  • 平滑過渡動畫
  • 可設定的疊加樣式

適合對象

  • 帶有影像內容的行動與桌面應用程式
  • 電子商務應用
  • 照片分享平台
  • 內容豐富的教育類應用程式
  • 互動式文件

使用建議

  • 需要正確的圖像加載處理
  • 可能影響大型圖像集的效能
  • 需要仔細設定以確保可存取性
  • 僅限圖像顯示
  • 依賴外部依賴項以實現進階功能

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

lightbox

A simple package to recreate web lightbox in Flutter. Ligthbox enables you to show images in an overlay widget with controls to slide between images.

The source code is 100% Dart, and everything resides in the /lib folder.

Show some :heart: and star the repo to support the projectd

Open Source Love License

Installation

Add lightbox as a dependency in your pubspec.yaml file.

dependencies:
  lightbox: 0.1.0

image

Then import lightbox:

import 'package:lightbox/lightbox.dart';

Example usage

import 'package:lightbox/lightbox.dart';
          // images variable is an array of paths or url of images to load in the lightbox.
                   ListView.separated(
                                       separatorBuilder: (context, index) => SizedBox(width: 10.0),
                                       scrollDirection: Axis.horizontal,
                                       itemCount: imagesAsset.length,
                                       itemBuilder: (context, position) {
                                         return GestureDetector(
                                           child: Container(
                                               height: 200,
                                               width: 200,
                                               child: Image.asset(
                                                 imagesAsset[position],
                                                 fit: BoxFit.cover,
                                               )),
                                           onTap: () {
                                             Navigator.push(
                                                 context,
                                                 LightBoxRoute(
                                                     builder: (BuildContext context) {
                                                       return LightBox(
                                                       images:imagesAsset,
                                                         initialIndex: position,
                                                         imageType: ImageType.ASSET,
                                                       );
                                                     },
                                                     dismissible: false));
                                           },
                                         );
                                       }),

You can find a more detailed example here

📃 License

Copyright (c) 2020 Lemovou Ivan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Getting Started

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

For help on editing package code, view the documentation.

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。