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.

example/lib/main.dart

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(
            selectedColor: Colors.white,
            selectedTileColor: Colors.blue,
            selectedItemId: 'settings',
            items: const [
              TuanisSidebarItem(
                id: 'dashboard',
                tile: ListTile(
                  leading: Icon(Icons.dashboard),
                  title: Text('Dashboard'),
                ),
                items: [
                  TuanisSidebarItem(
                    id: 'dashboard_1',
                    tile: ListTile(
                      leading: Icon(Icons.abc),
                      title: Text('Child of Dashboard'),
                    ),
                  )
                ],
              ),
              TuanisSidebarItem(
                id: 'settings',
                tile: ListTile(
                  title: Text('Settings'),
                  leading: Icon(Icons.settings),
                ),
              )
            ],
          ),
          Expanded(
            child: Container(
              padding: const EdgeInsets.all(50),
              color: Colors.white,
              child: const Text('App body here'),
            ),
          )
        ],
      ),
    );
  }
}
12
likes
0
points
51
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