automap 0.1.0
automap: ^0.1.0 copied to clipboard
A lightweight object mapper for Dart, with support for automatic JSON-based mapping and manual mapping expressions.
Changelog #
0.1.0 - 2026-08-14 #
Note: this release drops support for Dart 2 and contains breaking changes.
Breaking changes #
- Require Dart 3 (
sdk: ^3.0.0). - Rename
MapDoesNotExistErrortoMapDoesNotExistExceptionandMapDuplicateErrortoMapDuplicateException; every exception now extends the new sealedAutoMapperExceptionbase class. AutoMappernow has a private constructor: use theAutoMapper.Isingleton, orAutoMapper.reset()to get a fresh instance.- Manual map expressions now receive
Map<String, dynamic>params instead of a rawMap. MapExceptionnow exposesmessage,causeandstackTracefields.AutoMapperModelis now anabstract interface class.
Features #
- Add
AutoMapper.reset()to replace the singleton instance, useful to isolate state between tests. - Deprecate
addMapin favor ofaddAutoMap(kept as a delegating alias). - Wrap failures thrown by mapping expressions in
MapException, preserving the original cause and stack trace; programming errors (Error) are no longer masked and propagate untouched. - Validate the result of mapping expressions and throw a descriptive
MapExceptioninstead of failing with an opaque cast error. - Throw a descriptive
MapDoesNotExistExceptionwhen an auto map exists but the source does not implementAutoMapperModel.
Maintenance #
- Migrate from the discontinued
lintpackage topackage:lintswithstrict-casts,strict-raw-typesandstrict-inference. - Add a full test suite and GitHub Actions CI and release workflows.
- Remove the stale Flutter
.metadataartifact.
0.0.3 - 2021-04-24 #
- Add lint style badge to README.md
- Update repository in pubspec.yaml
0.0.2 - 2021-04-23 #
- Fix description
0.0.1 - 2021-04-23 #
- Initial implementation