Skip to content

irshad365/adaptive_navigation

Repository files navigation

Adaptive Navigation in Flutter

This project demonstrates how to build an adaptive navigation bar in Flutter that adjusts its layout based on the device's screen size. It utilizes GoRouter for navigation and provides a seamless user experience across mobile, tablet, and web platforms.

Adaptive Navigation Demo

Features

  • Responsive Navigation: The navigation bar automatically adapts to different screen sizes.
    • Mobile: Bottom navigation bar.
    • Tablet: Side navigation rail.
    • Web: Top tab bar.
  • GoRouter Integration: Leverages GoRouter for declarative routing and navigation management.
  • Clean Code Structure: Organized codebase for easy understanding and maintenance.
  • Customizable: Easily modify the navigation bar items and layout to fit your specific needs.

Getting Started

  1. Clone the repository: git clone https://github.com/your-username/adaptive-navigation-flutter.git

  2. Install dependencies: flutter pub get

  3. Run the app: flutter run

Usage

The app showcases a basic example of adaptive navigation. You can customize it further by:

  • Adding your own navigation destinations.
  • Modifying the layout and styling of the navigation bar.
  • Integrating with your existing Flutter application.

Article

For a detailed explanation of the implementation, including code snippets and insights, please refer to the following Medium article:

Adaptive Navigation in Flutter: Bottom for Mobile, Side for Tablet, Top for Web with GoRouter

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.