搜索插件、代码仓与 APP 分类

bottom_bar_with_sheet 封面
插件详情v2.4.0

bottom_bar_with_sheet

该包可帮助您创建底部栏,其中包含 FloatingActionButton,可在每个页面上显示 BottomSheet 小部件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
505
喜欢数
613
Pub 分数
150

安装插件

flutter pub add bottom_bar_with_sheet

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

bottom_bar_with_sheet 包简化了在任何页面上创建底部导航栏和 FloatingActionButton 的过程,该按钮可触发底部弹出面板。它以一种一致且用户友好的方式,跨平台地简化了导航和访问额外内容。非常适合需要快速访问操作或菜单而又不离开当前屏幕的应用程序。该包支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。

适合场景

  • 通过 BottomSheet 快速访问操作
  • 跨多个页面的一致性导航
  • 增强用户与浮动操作的交互
  • 在应用程序中集成上下文菜单
  • 构建响应式移动优先界面

主要特点

  • BottomNavigationBar 集成
  • FloatingActionButton 触发 BottomSheet
  • 跨平台支持
  • 简单的 API 用于设置
  • 可重用组件结构

适合对象

  • 移动应用开发者
  • 寻求一致性的UI/UX设计师
  • 需要频繁访问操作的应用
  • 使用 Flutter 开发多平台应用的开发者
  • 具有复杂导航需求的项目

使用建议

  • 可能需要自定义样式以适应独特设计
  • 仅限底部弹出窗口功能
  • 依赖于 Flutter 的 Material 设计系统
  • 不适合非底部弹出面板的交互
  • 大量嵌套工作表可能带来的性能影响

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Bottom bar with Sheet

Build Status License Pub Stars

Pub likes Pub popularity Pub points

💥Non-standard way to use more space of screens in your application💥
😳Custom bottom Sheet under Bottom Navigation Bar😳
😩Sounds sucks? 😉 First of all look at screens!

Image Image Image Image

Table of Content


Getting Started

Add dependency
dependencies:
  bottom_bar_with_sheet: ^2.4.0
Add import package
import 'package:bottom_bar_with_sheet/bottom_bar_with_sheet.dart';
Easy to use

Create a Scaffold widget and set bottomNavigationBar with BottomBarWithSheet like in the code below

Scaffold(
  bottomNavigationBar: BottomBarWithSheet(
    controller: _bottomBarController,
    bottomBarTheme: const BottomBarTheme(
      decoration: BoxDecoration(color: Colors.white),
      itemIconColor: Colors.grey,
    ),
    items: const [
      BottomBarWithSheetItem(icon: Icons.people),
      BottomBarWithSheetItem(icon: Icons.favorite),
    ],
  ),
);

More examples you can see here


Attributes

Attribute Type Annotation
autoClose bool If true the [BottomBarWithSheetItem]'s DO NOT automatically close the child sheet when pressed
disableMainActionButton bool disable MainActionButton if true , enable if false
sheetChild Widget that displayed on bottom of BottomBarWithSheet when isOpened == true
items List BottomBarWithSheetItem navigation buttons of BottomBarWithSheet
bottomBarTheme BottomBarTheme theme of BottomBarWithSheet
mainActionButtonTheme MainActionButtonTheme theme of Main Action Button
onSelectItem Function Callback Function works by clicking on one of items Return int index of selected button
duration Duration animation time of closing / opening BottomBarWithSheet
curve Curve the style of animation from the suggested ones of Curve
bottomBarMainAxisAlignment MainAxisAlignment The direction in which the widget content will line up
mainActionButtonBuilder MainActionButton Custom version of Main Action Button

Attributes of BottomBarTheme

Attribute Type Annotation
height double BottomBarWithSheet icons line height
heightOpened double BottomBarWithSheet height when isOpened == true
heightClosed double BottomBarWithSheet height when isOpened == false
decoration BoxDecoration decoration of BottomBarWithSheet
contentPadding EdgeInsets create padding between content of widget and sides
backgroundColor Color BottomBarWithSheet background color
selectedItemIconColor Color selected item icon color
itemIconColor Color unselected item icon color
selectedItemTextStyle Color selected item text style
itemTextStyle Color unselected item text style
selectedItemIconSize double size of item icon when item is pressed
mainButtonPosition enum filed that response for the position of MainActionButton position this field have 3 possible values: MainButtonPosition.left, MainButtonPosition.right , MainButtonPosition.Center
isVerticalItemLabel bool makes the labels of the items appear vertically or horizontally

Attributes of MainActionButtonTheme

Attribute Type Annotation
size double size of button
icon Widget icon that displayed in center of MainActionButton
color Color background color of widget circle
splash Color splash color of widget circle
margin EdgeInsets side paddings of Main Action Button
transform Matrix4 This field can set transform location of Main Action Button

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。