ff_annotation_route
12.1.0, released 2 months ago by fluttercandies.com
Annotation-driven route generator and navigation helper for Flutter
What it does
Scans Dart code for annotations like @FFRoute to generate strongly-typed routing maps and argument helpers. It supports multiple navigation frameworks including Navigator 1.0/2.0, GetX, and GoRouter, alongside route interceptors and lifecycle observers.
AI-written summary of version 12.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want strongly-typed routing and arguments generated via annotations
- Your project uses Navigator 1.0, 2.0, GetX, or GoRouter and needs centralized route maps
- You need built-in route interceptors and page lifecycle callbacks
Skip it when
- You prefer manual route table definitions without code generation tools
- You do not want external command-line tools or global activation in your build workflow
Strengths
- Multi-navigation paradigm support (Navigator 1.0/2.0, GetX, GoRouter)
- Strongly-typed argument helpers and auto-import features
- Supports fast mode and full analysis mode for monorepos
Weaknesses
- Requires running an external CLI command for route generation
- Fast mode requires manual import statements or @FFAutoImport for complex arguments
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 13
Activate the plugin globally using `dart pub global activate ff_annotation_route`, add dependencies like ff_annotation_route_core and ff_annotation_route_library, and execute the route generator command in the project root.
@FFRoute(
name: "fluttercandies://mainpage",
routeName: "MainPage",
)
class MainPage extends StatelessWidget {
const MainPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) => Container();
}Alternatives
Packages that do the same job and could replace ff_annotation_route.
- auto_route
Provides a robust, annotation-driven routing solution with built-in declarative routing and generated type-safe arguments.
87Compare - go_router
Offers an official declarative routing package with deep linking built directly into the Flutter ecosystem without mandatory code generation tools.
98Compare
Works with
Packages commonly used together with ff_annotation_route: ones it builds on, ones built on it, and its own family.
- analyzerff_annotation_route depends on itPerforms static analysis of Dart code for tool integration and embedding.
- yamlff_annotation_route depends on itA Dart library for parsing YAML documents into Dart data structures.
- cryptoff_annotation_route depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- pub_semverff_annotation_route depends on itVersions and version constraints implementing pub's versioning policy.
- package_configff_annotation_route depends on itRead and write Dart package configuration files.
- ioff_annotation_route depends on itUtilities for the Dart VM Runtime including ANSI colors, file copying, and exit code values.
- dart_styleff_annotation_route depends on itProvides an API and CLI to format Dart source code automatically.
- argsff_annotation_route depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.