Warning
The development of this package is currently on hold until support for augmented class lands. Until then consider using build_runner_hook for a more seamless code-gen experience.
A Dart workspace containing packages for annotation-driven code generation through the Dart Analyzer plugin system — no build runners required.
| Package | Description | pub.dev |
|---|---|---|
| analyzer_kit | Dart Analyzer plugin providing lint rules and quick fixes | |
| analyzer_kit_annotation | Annotations consumed by the plugin |
# pubspec.yaml
dependencies:
analyzer_kit_annotation: ^1.0.0+1# analysis_options.yaml
plugins:
analyzer_kit:
version: ^1.0.0+2
diagnostics:
data_class_annotation: true
copy_with_annotation: true
override_equality_annotation: true
override_to_string_annotation: true
serialize_annotation: true
deserialize_annotation: trueimport 'package:analyzer_kit_annotation/analyzer_kit_annotation.dart';
@dataClass
class User {
final String name;
final int age;
User({required this.name, required this.age});
// Apply IDE quick fix → generates copyWith, ==, hashCode, toString, toMap, fromMap
}This project is configured as a Dart workspace.
# Resolve dependencies for all packages
dart pub get
# Run analyzer_kit_annotation tests
cd packages/analyzer_kit_annotation && dart test
# Run analyzer_kit tests
cd packages/analyzer_kit && dart testSee LICENSE for details.