搜尋套件、儲存庫與 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.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。