FLUTTER ECOSYSTEM

auto_route

AutoRoute is a declarative routing solution, where everything needed for navigation is automatically generated for you.

Latest version
11.2.0
30-day downloads
361K
Likes
3.4K
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

AutoRoute is a declarative routing library for Flutter that automatically generates route configurations, navigators, and route guards based on annotated classes. It simplifies navigation by eliminating boilerplate code, enabling type-safe, compile-time verified routes. Developers define routes using annotations, and the package generates corresponding code, reducing runtime errors and improving development speed. Ideal for apps with complex navigation structures, AutoRoute supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux.

Use cases
  • Complex navigation flows
  • Type-safe routing
  • Reducing boilerplate code
  • Multi-platform apps
  • Dynamic route generation
  • Navigation guards
Key features
  • Declarative route definitions
  • Automatic code generation
  • Type-safe navigation
  • Compile-time route validation
  • Support for nested routes
  • Platform-agnostic
Suitable for
  • Large-scale Flutter applications
  • Teams prioritizing code maintainability
  • Developers seeking reduced boilerplate
  • Apps requiring advanced routing logic
  • Projects targeting multiple platforms
Considerations
  • Requires build_runner for code generation
  • Learning curve for annotation-based setup
  • Potential for increased build times
  • Limited customization compared to manual routing
  • May not suit very simple apps with minimal navigation
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add auto_route

Categories

Dependencies

Dependency list 6 items

Source repository

Related projects

Rankings