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

background_app_bar 封面
套件詳情v2.1.0+1

background_app_bar

一個背景應用欄插件,若要於捲動時保留滑動應用欄的背景,請使用此插件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
54
喜歡數
47
Pub 分數
140

安裝套件

flutter pub add background_app_bar

套件介紹

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

background_app_bar 套件是一個 Flutter 插件,專門設計用於在滾動時維持 SliverAppBar 的背景外觀。它確保視覺背景(例如圖像或漸層)在使用者滾動時仍能保持可見且一致,進而提升應用程式介面的視覺連續性。適用於具有豐富、沉浸式設計的應用程式,此套件可在 Android、iOS、Web、macOS、Windows 及 Linux 等多個平台運作。該套件可無縫整合至現有的 SliverAppBar 實作中,無需進行重大程式碼變更。

適用情境

  • 在可滾動介面中保持視覺連續性
  • 使用持久背景創建沉浸式應用體驗
  • 增強滾動時的UI設計一致性
  • 建構視覺豐富的儀表板或畫廊
  • 使用穩定背景實現視差效果

主要特色

  • 滾動時保留背景
  • 支援圖像和漸變
  • 跨平台相容性
  • 與 SliverAppBar 的輕鬆整合
  • 最小設定需求

適合對象

  • 注重設計的 Flutter 應用程式
  • 具有複雜滾動佈局的應用程式
  • 注重視覺精緻的開發者
  • 大量使用 SliverAppBar 的項目
  • 建構多平台應用的團隊

使用建議

  • 可能影響大型背景資源的效能
  • 需要仔細處理圖像解析度
  • 不適合簡單、極簡的使用者介面
  • 除了保留背景外,自定功能有限
  • 最佳搭配優化資源以實現流暢滾動

原始 README

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

Widget Background App Bar

A background app bar plugin, use this plugin if you want to preserve background of sliver app bar when scrolling,

inspired by GradientAppBar GitHub

Screenshots

Don't forget to tap + button 5 times

Screenshot-1565398534.png Screenshot-1569417041.png Screenshot-1569417048.png Screenshot-1569417051.png

Getting Started

  1. Depend on it by adding this to your pubspec.yaml file: background_app_bar: ^1.0.0

  2. Import it: import 'package:background_app_bar/background_app_bar.dart'

  3. Replace your current FlexibleSpaceBar (In the AppBar or SliverAppBar) to BackgroundFlexibleSpaceBar.

SliverAppBar(
    expandedHeight: _kAppBarSize,
    floating: false,
    pinned: true,
    snap: false,
    elevation: 0.0,
    backgroundColor: Colors.transparent,
    flexibleSpace: BackgroundFlexibleSpaceBar(
        title: widget.title != null ? Text(widget.title!) : null,
        centerTitle: false,
        titlePadding: const EdgeInsets.only(left: 20.0, bottom: 20.0),
        background: ClipRect(
            child: Container(
                child: BackdropFilter(
                    filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
                    child: Container(
                        decoration: BoxDecoration(
                            color: Colors.black.withOpacity(0.5),
                        ),
                    ),
                ),
                decoration: const BoxDecoration(
                    image: DecorationImage(
                        image: AssetImage("images/bg.jpg"),
                        fit: BoxFit.fill,
                    ),
                ),
            ),
        ),
    ),
)

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。