analyzer_kit_annotation 2.0.0
analyzer_kit_annotation: ^2.0.0 copied to clipboard
Annotations for use with the analyzer_kit analyzer plugin.
2.0.0 #
- Breaking:
- Removed
DataClassand@dataClassin favor ofCompositeAnnotation, allowing users to compose reusable annotation bundles with custom configurations. - Updated Dart SDK constraint to
^3.14.0(adopting primary constructors and dot-shorthand across annotation classes).
- Removed
- New Annotations & Options:
- Added
CompositeAnnotation([...])for bundling any combination of class-level annotations (CopyWith,OverrideEquality,OverrideToString,Serialize,Deserialize, or nestedCompositeAnnotations). - Added field-level
@Ignore(@ignore) accepting aSet<ClassAnnotation>(e.g.@Ignore({.serialize, .overrideToString})) to exclude fields per feature. - Added field-level
@Redact(@redact) accepting aSet<ClassAnnotation>(defaulting to{.overrideToString}) and an optionalplaceholder(defaulting to'[REDACTED]') to mask sensitive field values in generated output. - Added
FieldRename(none,snake,kebab,pascal,screamingSnake) to@Serializeand@Deserializefor configuring map key casing. - Added
ClassAnnotationenum (copyWith,overrideEquality,overrideToString,serialize,deserialize) shared by@Ignoreand@Redact. - Added
nullableoption onCopyWith(@CopyWith(nullable: true)) for resetting nullable fields tonull. - Added
multilineoption onOverrideToString(@OverrideToString(multiline: true)) for multi-linetoString()formatting. - Added
deepCollectionEqualityoption onOverrideEqualityand switcheddeepHash/deepEqualsto order-sensitiveDeepCollectionEquality().
- Added
1.0.0+1 #
- Documentation:
- Small documentation updates related to intializing and enabling the plugin
1.0.0 #
- Initial release.
- Annotations:
CopyWith— marks a class forcopyWithmethod generation.OverrideEquality— marks a class for==andhashCodegeneration, with optionaldeepCollectionEqualitycontrol.OverrideToString— marks a class fortoStringoverride generation.DataClass— composite annotation enablingcopyWith,overrideEquality,overrideToString,serialize, anddeserializewith individual toggle flags.Serialize— marks a class for serialization method generation (toMap,toJson, or custom viaSerializeMethod).Deserialize— marks a class for deserialization factory generation (fromMap,fromJson, or custom viaDeserializeMethod).
- Sealed class hierarchies:
SerializeMethodwith factories:.toMap(),.toJson(),.custom(String name).DeserializeMethodwith factories:.fromMap(),.fromJson(),.custom(String name).
- Runtime helpers:
deepHash(Object?)— deep recursive collection hashing.deepEquals(Object?, Object?)— deep recursive collection equality.
- Convenience constants for all annotations (e.g.,
@dataClass,@copyWith,@serialize).