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

full_screen_image_null_safe 封面
套件詳情v2.0.0

full_screen_image_null_safe

全螢幕照片檢視器。垂直滾動時會關閉。可與 Hero 小部件一起使用。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
842
喜歡數
43
Pub 分數
130

安裝套件

flutter pub add full_screen_image_null_safe

套件介紹

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

一個適用於 Flutter 的全螢幕圖片查看器套件,當使用者垂直捲動時會自動關閉。支援與 Hero 小工具無縫整合,實現圖片之間的順暢過渡。設計為完全空值安全,並可在 Android、iOS、Web、macOS、Windows 和 Linux 等多個平台相容。非常適合需要沉浸式照片瀏覽體驗及直覺的手勢導航之應用程式。

適用情境

  • 全螢幕檢視高解析度影像
  • 建立具有平滑過渡效果的影像相簿
  • 與 Hero 動畫整合以實現圖像分享
  • 增強行動與網頁端的照片瀏覽體驗
  • 實現滑動關閉行為
  • 在全螢幕模式中顯示圖像

主要特色

  • 垂直滾動時自動消失
  • 空安全的 Dart 實現
  • Hero widget 相容性
  • 跨平台支援(Android、iOS、Web、macOS、Windows、Linux)
  • 手勢驅動的導航
  • 輕量且易於整合

適合對象

  • 行動和網頁照片畫廊應用
  • 圖像密集型應用
  • 使用英雄過渡的App
  • 尋求簡單全螢幕圖像檢視器的開發者
  • 需要跨平台圖像顯示的項目
  • 想要直覺圖像導航的使用者

使用建議

  • 可能不支援水平捲動關閉
  • 手勢的自定義選項有限
  • 依賴父滾動上下文進行關閉
  • 最適合單張圖像檢視,而不是複雜版面
  • 在嵌套的滾動視圖中需要謹慎處理
  • 不適用於影片或動畫內容

原始 README

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

Full Screen image

Full screen photo viewer. It shuts off when scrolling vertically. Can work with Hero widget

Installation

To use this plugin, add full_screen_image_null_safe as a dependency in your pubspec.yaml file.

full_screen_image_null_safe: any

Getting Started

Check out the example app using full_screen_image.

Flutter

Full screen image:
  FullScreenWidget(
        child: ClipRRect(
          borderRadius: BorderRadius.circular(16),
          child: Image.asset(
            "assets/image1.jpg",
            fit: BoxFit.cover,
          ),
        ),
      )

Full screen with hero:
FullScreenWidget(
        child: Hero(
          tag: "customTag",
          child: ClipRRect(
            borderRadius: BorderRadius.circular(16),
            child: Image.asset(
              "assets/image2.jpg",
              fit: BoxFit.cover,
            ),
          ),
        ),
      );

Small image:

if you don't want widget full screen then use center widget

 FullScreenWidget(
        child: Center(
          child: Hero(
            tag: "smallImage",
            child: ClipRRect(
              borderRadius: BorderRadius.circular(16),
              child: Image.asset(
                "assets/image3.jpg",
                fit: BoxFit.cover,
              ),
            ),
          ),
        ),
      );
Custom background color:
FullScreenWidget(
        backgroundColor: Colors.purple,
        child: Center(
          child: Hero(
            tag: "customBackground",
            child: ClipRRect(
              borderRadius: BorderRadius.circular(16),
              child: Image.asset(
                "assets/image3.jpg",
                fit: BoxFit.cover,
              ),
            ),
          ),
        ),
      );

Non transparent widget:
FullScreenWidget(
        backgroundColor: Colors.purple,
        backgroundIsTransparent: false,
        child: Center(
          child: Hero(
            tag: "nonTransparent",
            child: ClipRRect(
              borderRadius: BorderRadius.circular(16),
              child: Image.asset(
                "assets/image3.jpg",
                fit: BoxFit.cover,
              ),
            ),
          ),
        ),
      );

Custom widget:
  FullScreenWidget(
        child: SafeArea(
          child: Card(
            elevation: 4,
            child: Container(
              height: 350,
              padding: const EdgeInsets.all(8.0),
              child: Column(
                children: <Widget>[
                  Hero(
                    tag: "customWidget",
                    child: ClipRRect(
                      borderRadius: BorderRadius.circular(16),
                      child: Image.asset(
                        "assets/image3.jpg",
                        fit: BoxFit.cover,
                      ),
                    ),
                  ),
                  SizedBox(
                    height: 16,
                  ),
                  Text('Lorem text',style: TextStyle(color: Colors.black,fontWeight: FontWeight.bold),),
                  SizedBox(
                    height: 16,
                  ),
                  Expanded(
                    child: Text(
                      lorem,
                    ),
                  ),

                ],
              ),
            ),
          ),
        ),
      );

License

Apache

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。