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

interactive_bottom_sheet 封面
套件詳情v1.1.1

interactive_bottom_sheet

一個可自訂的互動式底部彈出層,讓您可以與其背後的螢幕進行互動。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
116
喜歡數
65
Pub 分數
160

安裝套件

flutter pub add interactive_bottom_sheet

套件介紹

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

一個可自訂的互動式底部抽屜,允許使用者與其下方內容互動,進而提升使用者參與度。專為 Flutter 應用設計,支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 及 Linux。底部抽屜可拖曳、滑動或點擊,同時維持底層螢幕元素的可見性,提供動態且沉浸式的使用者介面體驗。適用於對話方塊、快速動作或補充資訊面板。

適用情境

  • 互動式彈窗
  • 快速操作面板
  • 補充資訊顯示
  • 可拖曳的覆蓋層
  • 增強的使用者導航
  • 模態表單

主要特色

  • 可拖曳且可滑動
  • 透明或半透明設計
  • 內容背後的可互動區域
  • 跨平台支援
  • 可自訂外觀
  • 平滑動畫

適合對象

  • 尋求互動式 UI 的開發者
  • 需要層疊互動的應用
  • 專注於使用者參與度的設計師
  • 跨平台 Flutter 項目
  • 複雜的底部彈出視窗實作

使用建議

  • 可能需要小心管理 z-index
  • 重度後置內容帶來的效能影響
  • 某些平台上的原生整合有限
  • 潛在的可訪問性挑戰
  • 需要在多個設備上進行測試
  • 不適用於全螢幕覆蓋

原始 README

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

Interactive Bottom Sheet

pub package package publisher style license

A customizable interactive bottom sheet, which lets you interact with the screen behind it.

Preview example

Features

  • Easy to use
  • Customizable colors
  • Customizable DraggableArea
  • Customizable heights and widths of different parts of the sheet
  • Possibility to declare snap points

Usage

Depend on it:

dependencies:
  interactive_bottom_sheet: ^1.0.0

Import it:

import 'package:interactive_bottom_sheet/interactive_bottom_sheet.dart';

Example

Scaffold(
  bottomSheet: const InteractiveBottomSheet(
    options: InteractiveBottomSheetOptions(),
    child: Text(
       'Lorem ipsum dolor sit amet.'
    ),
  ),
);

Customization options

Scaffold(
  bottomSheet: const Scaffold(
  bottomSheet: InteractiveBottomSheet(
    options: InteractiveBottomSheetOptions(
      maxSize: 0.75,
      backgroundColor: Colors.green,
      snapList: [0.25, 0.5],
    ),
    draggableAreaOptions: DraggableAreaOptions(
      topBorderRadius: 10,
      height: 75,
      backgroundColor: Colors.grey,
      indicatorColor: Colors.grey,
      indicatorWidth: 50,
      indicatorHeight: 50,
      indicatorRadius: 10,
      ),
    ),
    child: Text('Lorem ipsum dolor sit amet.'),
  ),
);

Top Border Radius

To get rounded Borders at the top of the sheet (usual for iOS) on the top side of the widget, it is necessary to overwrite the bottomSheetTheme.

Theme(
  data: Theme.of(context).copyWith(
    bottomSheetTheme: const BottomSheetThemeData(
      backgroundColor: Colors.transparent
    ),
  ),
  child: const Scaffold(
    bottomSheet: InteractiveBottomSheet(
      child: Text('Lorem ipsum dolor sit amet.'),
    ),
  ),
);

所屬分類

原始碼儲存庫

使用此套件的專案