crystallis_generator 0.0.4
crystallis_generator: ^0.0.4 copied to clipboard
Compile-time codegen utility for the Crystallis package (use with `dev_dependencies`)
0.0.4 #
- 🛑 Breaking: Renamed
@CrystallisDatato@Crystallise, andCrystallisMixintoCrystallisData - Introduced
MutableCrystallisDataandImmutableCrystallisDatafor better code path splitting - 🛑 Breaking: Renamed
copyFromtosetFromto better reflect its purpose - 🛑 Breaking: Implemented a (new)
copyFrom: it creates a new instance (likecopyWith) by copying compatible fields from another instance (likesetFrom) - ✨ New!
copyWithnow supports explicit/implicit null distinction, allowing nullable fields to be set to null viacopyWithwithout ambiguity (#6, #7, thanks @FMorschel 🩵!) - ✨ New! Implemented
tryGet: a safe alternative togetthat returnsnullinstead of throwing if the field doesn't exist or is of an incompatible type - 🔧 Fixed support for multiple data classes per file (#5)
- Improved annotation constraints and error messages for a better developer experience
- Fixed nullable fields not being supported (#2)
- Refactored serialization
- Fixed JSON incompatibility with some non-String keys
- Improved testing
- Improved map deserialization (maintains original key/value types instead of (now broken) heuristics)
- 🛑 Breaking: Renamed
@Serializerto@Serializableand added aSerializerbase abstract class class for better extensibility - Properly implemented codegen for custom serializers via field annotations
0.0.3 #
- Implemented serialization!
- Per-field
@Serializerannotation to customize de/serialization - Built-in support for primitive types, lists, maps, and nested Crystallis data classes
serializemethod to convert to JSON-compatibleMap<String, dynamic>- Generates a
deserializeconstructor to create instances fromMap<String, dynamic>(optional, on by default)
- Per-field
- Added
copyFrommethod to copy compatible fields between different data classes
0.0.2 #
- Implemented generation for
toString,==, andhashCodemethods (optional, on by default) - Added
useDeepEqualityoption to control deep equality checks for collections (off by default) - Made
copyWithmethod generation optional (on by default) - Added
useDeepCopyoption to control deep copying of collections incopyWith(off by default) - Added export for
@immutablefrompackage:meta
0.0.1 #
Initial release.