Flutter Sidebar Widget 🎯

Pub Version License: MIT

A highly customizable Admin panel navigation package for Flutter applications that provides a beautiful, responsive, and feature-rich navigation experience. Perfect for admin panels, dashboards, and complex navigation structures.

Features ✨

  • 🎨 Highly Customizable - Colors, width, icons, and more
  • 📱 Responsive Design - Adapts to different screen sizes
  • 🔗 Nested Navigation - Multi-level navigation support
  • Smooth Animations - Beautiful expand/collapse transitions
  • 💫 Hover Effects - Interactive states for better UX
  • 🎈 Dynamic Widgets - Navigation items and custom widgets
  • 🔄 Route Integration - Seamless Flutter routing
  • 📦 Simple Setup - Minimal configuration required

📸 Screenshots

desktop-ui mobile-ui

Installation 📦

Add to pubspec.yaml:

dependencies:
  admin_widget: ^0.0.1

Then run:

flutter pub get

Usage 💻

  1. Import the package:
import 'package:admin_widget/admin_widget.dart';

Basic Example

import 'package:flutter/material.dart';
import 'package:admin_widget/admin_widget.dart';
import 'package:go_router/go_router.dart';

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

  @override
  Widget build(BuildContext context) {
    final path = GoRouterState.of(context).uri.path;
    return AdminWidget();
  }
}
final List<dynamic> items = [
  NavigationItem(
    title: 'Dashboard',
    icon: Icons.dashboard,
    route: RouteNames.dashboard,
  ),
  Divider(),
  NavigationItem(
    title: 'Item1',
    icon: Icons.school,
    route: RouteNames.students,
    subItems: [
      Subitem(title: 'subitem1', route: 'item1/subitem1'),
      Subitem(title: 'subitem2', icon: Icons.assignment, route: 'item1/subitem2'),
    ],
  ),
  Container(child: Text('Custom Widget'))
];

Customization 🎨

Key properties:

  • currentRoute: Active route
  • items: Navigation items and widgets
  • backgroundColor: Sidebar color
  • width: Sidebar width
  • onRouteSelected: Route selection callback
  • onRoute: Route handling toggle

Resources 📚

Contributing 🤝

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Author & Contact 👤

Rupkumar Sarkar

License 📄

MIT License - See LICENSE file


Made with ❤️ by Rupkumar Sarkar