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

flutter_admin_scaffold 封面
套件詳情v1.4.0

flutter_admin_scaffold

一個帶有側邊欄且與 appBar 配合工作的 scaffold 類。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
861
喜歡數
208
Pub 分數
140

安裝套件

flutter pub add flutter_admin_scaffold

套件介紹

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

一個 Flutter 套件,提供可自訂的骨架架構,搭配響應式側邊欄與應用程式列,專為管理儀表板與複雜導航佈局設計。支援抽屜與導航軌道兩種模式,並能順暢適應行動裝置、Web 與桌面平台。此骨架架構確保介面結構一致,同時實現流暢的導航與佈局管理。非常適合需要結構化、多層級導航且具清晰視覺層次的應用程式。

適用情境

  • 管理儀表板
  • 儀表板介面
  • 跨平台應用
  • 複雜的導航佈局
  • 響應式使用者介面設計

主要特色

  • 側邊欄整合
  • AppBar 兼容性
  • 響應式版面
  • 抽屜和導航欄支援
  • 跨平台一致性

適合對象

  • 開發人員建構管理面板
  • 需要一致導航的團隊
  • 針對多個平台的專案
  • UI密集型應用
  • 具有層級內容的應用程式

使用建議

  • 需要仔細處理嵌套路由
  • 可能需要自定樣式以適應獨特設計
  • 最適合大型應用程式
  • 僅限導航為主的使用情境
  • 依賴於正確的路線管理

原始 README

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

flutter_admin_scaffold

A scaffold class with a sideBar that works with a appBar.

example.gif

Usage

import 'package:flutter_admin_scaffold/admin_scaffold.dart';

You can add a sideBar as shown below. See example for details.

import 'package:flutter/material.dart';
import 'package:flutter_admin_scaffold/admin_scaffold.dart';

class SamplePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return AdminScaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      sideBar: SideBar(
        items: const [
          AdminMenuItem(
            title: 'Dashboard',
            route: '/',
            icon: Icons.dashboard,
          ),
          AdminMenuItem(
            title: 'Top Level',
            icon: Icons.file_copy,
            children: [
              AdminMenuItem(
                title: 'Second Level Item 1',
                route: '/secondLevelItem1',
              ),
              AdminMenuItem(
                title: 'Second Level Item 2',
                route: '/secondLevelItem2',
              ),
              AdminMenuItem(
                title: 'Third Level',
                children: [
                  AdminMenuItem(
                    title: 'Third Level Item 1',
                    route: '/thirdLevelItem1',
                  ),
                  AdminMenuItem(
                    title: 'Third Level Item 2',
                    route: '/thirdLevelItem2',
                  ),
                ],
              ),
            ],
          ),
        ],
        selectedRoute: '/',
        onSelected: (item) {
          if (item.route != null) {
            Navigator.of(context).pushNamed(item.route!);
          }
        },
        header: Container(
          height: 50,
          width: double.infinity,
          color: const Color(0xff444444),
          child: const Center(
            child: Text(
              'header',
              style: TextStyle(
                color: Colors.white,
              ),
            ),
          ),
        ),
        footer: Container(
          height: 50,
          width: double.infinity,
          color: const Color(0xff444444),
          child: const Center(
            child: Text(
              'footer',
              style: TextStyle(
                color: Colors.white,
              ),
            ),
          ),
        ),
      ),
      body: SingleChildScrollView(
        child: Container(
          alignment: Alignment.topLeft,
          padding: const EdgeInsets.all(10),
          child: const Text(
            'Dashboard',
            style: TextStyle(
              fontWeight: FontWeight.w700,
              fontSize: 36,
            ),
          ),
        ),
      ),
    );
  }
}

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。