flutter_admin_scaffold 0.0.1+3 copy "flutter_admin_scaffold: ^0.0.1+3" to clipboard
flutter_admin_scaffold: ^0.0.1+3 copied to clipboard

outdated

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

flutter_admin_scaffold #

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

example.gif

Usage #

import 'package:flutter_admin_scaffold/flutter_admin_scaffold.dart';

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

class DashboardPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return AdminScaffold(
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      sidebar: Sidebar(
        itemDatas: const [
          MenuItemData(
            title: 'Dashboard',
            route: '/',
            icon: Icons.dashboard,
          ),
          MenuItemData(
            title: 'Top Level',
            icon: Icons.file_copy,
            children: [
              MenuItemData(
                title: 'Second Level Item 1',
                route: '/secondLevelItem1',
              ),
              MenuItemData(
                title: 'Second Level Item 2',
                route: '/secondLevelItem2',
              ),
              MenuItemData(
                title: 'Third Level',
                children: [
                  MenuItemData(
                    title: 'Third Level Item 1',
                    route: '/thirdLevelItem1',
                  ),
                  MenuItemData(
                    title: 'Third Level Item 2',
                    route: '/thirdLevelItem2',
                  ),
                ],
              ),
            ],
          ),
        ],
        selectedRoute: '/',
        onSelected: (itemData) {
          Navigator.of(context).pushNamed(itemData.route);
        },
      ),
      body: Container(
        alignment: Alignment.topLeft,
        padding: const EdgeInsets.all(10),
        child: Text(
          'Dashboard',
          style: TextStyle(
            fontWeight: FontWeight.w700,
            fontSize: 36,
          ),
        ),
      ),
    );
  }
}
172
likes
0
pub points
93%
popularity

Publisher

verified publisherkeyber.jp

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_admin_scaffold