搜索插件、代码仓与 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.'),
    ),
  ),
);

所属分类

源码仓库

使用此插件的项目