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

套件詳情v0.0.4

drawer_swipe

用於顯示多層抽屜的抽屜滑動套件

近 30 天下載
48
喜歡數
76
Pub 分數
40

安裝套件

flutter pub add drawer_swipe

套件介紹

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

drawer_swipe 套件允許在 Flutter 應用中建立多層抽屜,提供基於滑動的互動方式來切換各層。專為直覺的使用者體驗設計,支援平滑過渡與可自訂的版面配置。適合需要階層式導航或分層內容呈現的應用,以手勢驅動存取提升易用性。此套件輕巧且能順暢整合至現有的 Flutter 專案中。

適用情境

  • 多層導航介面
  • 基於手勢的抽屜互動
  • 複雜的App導航結構
  • 可自訂的滑動面板
  • 透過滑動增強使用者體驗
  • 內容組織與分層視圖

主要特色

  • 支援多層抽屜
  • 滑動開啟手勢支援
  • 可自訂的動畫和樣式
  • 輕量且易於整合
  • 靈活的圖層管理
  • 響應式設計相容性

適合對象

  • 開發複雜導航系統的開發者
  • 需要分層UI組件的應用程式
  • 強調基於手勢導航的專案
  • Flutter 初學者探索抽屜模式
  • 設計師專注於互動式使用者流程
  • 行動優先的應用程式開發

使用建議

  • 有限的平台特定自訂
  • 無內建的從右到左配置支援
  • 需要手動處理圖層狀態
  • 可能需要額外的樣式以保持一致性
  • 未針對大量圖層進行優化
  • 依賴外部相依性以實現進階功能

原始 README

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

DrawerSwipe

Say Thanks!

A Swipe Drawer Library for Easy and Quick Usage.

The source code is 100% Dart, and everything resides in the /lib folder.

Show some :heart: and star the repo to support the project

Open Source Love License

GIF
GIF

💻 Installation

In the dependencies: section of your pubspec.yaml, add the following line:

drawer_swipe: <latest_version>

❔ Usage

Import this class
import 'package:drawer_swipe/drawer_swipe.dart';
Use SwipeDrawer
  @override
  Widget build(BuildContext context) {
  return Scaffold(  
    // add this line so you can add your appBar in Body  
    extendBodyBehindAppBar: true,  
    body: SwipeDrawer(  
      radius: 20,  
    key: drawerKey,  
    bodyBackgroundPeekSize: 30,  
    backgroundColor: Colors.red,  
    // pass drawer widget  
    drawer: buildDrawer(),  
    // pass body widget  
    child: buildBody(),  
    ),  
  );
  }

🎨 Customization and Attributes

SwipeDrawer attributes
Attribute Name Example Value Description
child BodyWidget() Screen Body Widget
drawer DrawerWidget() Drawer Body Widget
radius 20.0 body radius value the default value is 0.0
bodyBackgroundPeekSize 30.0 the distance between the main body and the faded one the default value is 50.0
backgroundColor Colors.red background color the default value is Colors.black
bodySize 70.0 body width when opening the drawer the default value is 80.0
curve Curves.easeOut animation curve default value is Curves.easeIn

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Ahmed Eslayed

💻

📃 License

Copyright (c) 2012 Pharous

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。