Overview
simple_auth_generator is a Flutter/Dart code generator that creates HTTP clients from annotated interfaces, leveraging source_gen for compile-time code generation. Inspired by Retrofit and Chopper, it simplifies API integration by automatically generating client classes with type-safe endpoints, request handling, and serialization. Developers define APIs using annotations, and the generator produces clean, maintainable code. It supports JSON serialization and works across macOS, Windows, and Linux platforms.
Use cases
- Generating type-safe HTTP clients
- Automating API endpoint boilerplate
- Integrating RESTful services with minimal code
- Streamlining JSON serialization
- Creating reusable API clients in Flutter apps
Key features
- Annotation-based API definition
- Compile-time code generation
- Type-safe HTTP requests
- Built-in JSON serialization
- Cross-platform support (macOS, Windows, Linux)
Suitable for
- Flutter developers building REST APIs
- Teams seeking reduced boilerplate
- Projects requiring maintainable HTTP clients
- Developers familiar with Retrofit/Chopper patterns
- Apps needing efficient JSON handling
Considerations
- Requires knowledge of source_gen and annotations
- Limited to HTTP client generation
- No runtime configuration options
- Depends on build_runner for code generation
- Not suitable for non-REST APIs without customization