tuanis_sidebar 0.1.0 copy "tuanis_sidebar: ^0.1.0" to clipboard
tuanis_sidebar: ^0.1.0 copied to clipboard

outdated

easy to use package to create sidebars specially for web, but can be integrated as a drawer in a mobile app. Allows nested items.

tuanis_sidebar #

Sidebar Flutter package

Example #

import 'package:flutter/material.dart';
import 'package:tuanis_sidebar/tuanis_sidebar.dart';

void main() {
  runApp(
    const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Example(),
    ),
  );
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Row(
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: [
          TuanisSidebar(
            selectedItemId: 'settings',
            items: [
              TuanisSidebarItem(
                id: 'dashboard',
                label: 'Dashboard',
                leadingIcon: Icons.dashboard,
                onClick: () {
                  print('dashboard');
                },
              ),
              TuanisSidebarItem(
                id: 'settings',
                label: 'Settings',
                leadingIcon: Icons.settings,
                onClick: () {
                  print('settings');
                },
              ),
              TuanisSidebarItem(
                id: 'inventory',
                label: 'Inventory',
                leadingIcon: Icons.inventory,
                onClick: () {
                  print('inventory');
                },
              ),
            ],
          ),
          Expanded(
            child: Container(
              padding: const EdgeInsets.all(50),
              color: Colors.orange,
              child: const Text('App body here'),
            ),
          )
        ],
      ),
    );
  }
}

screenshot

12
likes
0
points
54
downloads

Publisher

unverified uploader

Weekly Downloads

easy to use package to create sidebars specially for web, but can be integrated as a drawer in a mobile app. Allows nested items.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on tuanis_sidebar