copy_with_extension_gen
Automatically generating `copyWith` extensions code for classes with `@CopyWith()` annotation.
17.0.0
114K downloads/mo
#1071 most downloaded on pub.dev
numen31337/copy_with_extension
What this package is like to depend on
Last release 16 days ago
08 Aug 2026
Release timing varies
gaps range from 8 days to 6 months
Most releases are documented
notes for 43 of 48 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
49 releases · first in 2019
12 releases in the last 12 months
see the full history below
Release timeline
49 releases · Dec 2019 to Aug 2026Releases
latest 49-
17.0.008 Aug 2026Release notes
Open source →- BREAKING Generated proxies no longer extend the superclass proxy; each one is generated independently. Regenerate all
.g.dartfiles. - BREAKING
skipFields: trueno longer generates field-specific methods for inherited fields either. UsecopyWith(field: value). - BREAKING
copyWithNullis no longer inherited from an annotated superclass. Enable it per class or globally viabuild.yaml; affected classes fail generation with an explanatory error. - Fix invalid generated code when a subclass narrows an inherited field type, or when parent and child differ in
immutableFields.
- BREAKING Generated proxies no longer extend the superclass proxy; each one is generated independently. Regenerate all
-
16.0.002 Aug 2026Release notes
Open source →- Expand
analyzercompatibility to>=8.1.1 <15.0.0. - Fix silent argument shift when a non-trailing optional positional parameter is dropped from
copyWithgeneration. - Preserve import prefixes on type-parameter bounds in generated proxies.
- Expand
-
15.0.101 May 2026 -
15.0.026 Apr 2026Release notes
Open source →- BREAKING Constructor parameter resolution now requires an alias-safe binding. Parameters used only in derived initializer expressions, such as
super(a: b + 1)orfield = normalize(input), are rejected instead of being treated as direct field aliases. The previous behavior was unsound becausecopyWithonly has stored field values, not original constructor arguments or inverse logic for computed values. - Refactor internal implementation structure to improve maintainability and prepare future changes.
- Relax the
analyzerconstraint to>=8.1.1 <14.0.0.
- BREAKING Constructor parameter resolution now requires an alias-safe binding. Parameters used only in derived initializer expressions, such as
-
14.0.021 Mar 2026Release notes
Open source →- Raise the minimum Dart SDK to
^3.7.0. - Expand
analyzercompatibility to>=8.1.1 <13.0.0.
- Raise the minimum Dart SDK to
-
13.0.014 Mar 2026Release notes
Open source →- BREAKING Remove
package:copy_with_extension_gen/builder.dart. Importpackage:copy_with_extension_gen/copy_with_extension_gen.dartinstead when wiring the builder factory directly. - Preserve import prefixes in generated function-typed field signatures.
- Normalize proxy generics for typedef-inherited models and improve alias-based generation coverage.
- BREAKING Remove
-
12.1.020 Feb 2026 -
12.0.007 Feb 2026 -
11.0.010 Dec 2025 -
10.0.121 Sep 2025Release notes
Open source →- Proxy generator now inherits only within the same library, inlines otherwise. Fixes #114.
-
10.0.011 Sep 2025Release notes
Open source →- Updating
analyzerto^8.0.0 - Updating
source_gento^4.0.0 - Updating
buildto^4.0.0
- Updating
-
9.1.103 Sep 2025Release notes
Open source →- Fix constructor parameter resolution when initializers reference parameters or super constructors.
-
9.1.006 Aug 2025Release notes
Open source →- Added
immutableFieldsoption to treat class fields as immutable by default. - Forward annotations (e.g.,
@Deprecated) to generatedcopyWithparameters. - Preserve type aliases.
- Added support for redirection constructors.
- Added
-
9.0.006 Aug 2025Release notes
Open source →- BREAKING Dynamic fields are treated as nullable, affecting generated
copyWithsignatures. - Added robust inheritance support enabling
copyWithacross parent and child classes
- BREAKING Dynamic fields are treated as nullable, affecting generated
-
8.0.002 Aug 2025 -
7.1.028 Jul 2025Release notes
Open source →- Added namespace support for classes using import prefixes.
- Added comments and tests for clarity.
-
7.0.026 Jul 2025Release notes
Open source →- Migrated to the new analyzer
element2APIs. - Updating
analyzerto^7.0.0 - Updating
source_gento^3.0.0
- Migrated to the new analyzer
-
6.0.120 Jan 2025 -
6.0.030 Nov 2024Release notes
Open source →- BREAKING The
copyWithfunction no longer acceptsnullfor non-nullable fields to prevent ambiguity and errors.
- BREAKING The
-
5.0.414 Aug 2023 -
5.0.313 Jun 2023 -
5.0.227 Feb 2023Release notes
Open source →- Fix Allow having a nullable constructor parameter with a fallback for a non-nullable class field.
-
5.0.126 Feb 2023 -
5.0.002 Dec 2022Release notes
Open source →- Allow positional constructor parameters (thanks @mrgnhnt96).
- Ability to define library default settings globally (thanks @mrgnhnt96).
-
4.0.412 Oct 2022 -
4.0.305 Aug 2022Release notes
Open source →- Suppressing lint warnings for
library_private_types_in_public_api. - Classes that are declared as private will get a private
copyWithextension.
- Suppressing lint warnings for
-
4.0.219 May 2022 -
4.0.103 Feb 2022 -
4.0.006 Jan 2022Release notes
Open source →- BREAKING
copyWithfunction now correctly supports nullification of nullable fields like socopyWith(id: null). - BREAKING
CopyWithannotation for named constructornamedConstructoris renamed toconstructorto be in sync with json_serializable.
- BREAKING
-
3.0.022 Dec 2021Release notes
Open source →- Updating
analyzerto>=2.0.0 <4.0.0 - Named constructor support.
- Better error reporting.
- Introduction of the new
copyWithfunction with nullability support that can be used like so:myInstance.copyWith.value("newValue"). The old functionality is still available. - BREAKING
generateCopyWithNullis renamed tocopyWithNull.
- Updating
-
2.0.319 Jul 2021 -
2.0.224 Jun 2021 -
2.0.119 Mar 2021 -
2.0.008 Mar 2021 -
2.0.0-nullsafety.102 Feb 2021 pre-release -
1.4.025 Oct 2020Release notes
Open source →- Fixes an issue with generating code for some classes with generic type parameters.
-
1.3.109 Oct 2020 -
1.3.009 Oct 2020Release notes
Open source →- Fixes the
boolean-expression-must-not-be-null-exceptionissue - Introduces the
immutablefield annotation
- Fixes the
-
1.2.025 May 2020 -
1.1.007 Apr 2020 -
1.0.825 Jan 2020Release notes
Open source →- Suppresses some of the analyzer's rules as we do not support generic types yet.
-
1.0.715 Dec 2019 -
1.0.613 Dec 2019 -
1.0.513 Dec 2019Nothing published for this version
-
1.0.411 Dec 2019Nothing published for this version
-
1.0.311 Dec 2019Nothing published for this version
-
1.0.206 Dec 2019Nothing published for this version
-
1.0.106 Dec 2019Nothing published for this version
-
1.0.005 Dec 2019Release notes
Open source →- Allows you to generate a
copyWithextension for objects annotated with@CopyWith().
- Allows you to generate a