theme_extensions_gen 1.3.0
theme_extensions_gen: ^1.3.0 copied to clipboard
Generate Flutter ThemeExtensions from annotated templates with context accessors and no boilerplate.
Changelog #
1.3.0 #
- fix: templates with the concise
const factory({...}) = _$Name;constructor (Dart 3.13+, whatdart fixwrites forunnecessary_type_name_in_constructor) failed with aFormatterException; both factory forms work - fix: a template whose factory does not redirect fails with a message that names the class instead of generating code that does not compile
- fix:
@ThemeExtensionImpllists typedList<ThemeExtension<dynamic>>broke the generated list; the getter keeps itsList<ThemeExtension>type, so raw and typed implementations both compile - fix: templates and implementations outside
lib/(e.g.example/lib) were collected into the generated files and producedasset:imports and invalid getter names - fix: generated parts carry
// ignore_for_file: type=lint, like the context extensions and theme lists - chore: allow build 5 (
>=4.0.4 <6.0.0), which build_runner 2.17.1 requires; drop the unusedpub_semverdependency; raise dev dependencies (build_runner 2.17.1, build_test 3.5.23, test 1.33, material_ui 1.11.1) - chore: the very_good_analysis 11 rule set is written out in
analysis_options.yamlwith no lint dependency; the package and the example follow it - chore(example):
package:material_uiimports, concise constructors and dot shorthands - ci: Flutter 3.50.0,
dart analyze --fatal-infosanddart formatchecks, current action versions - docs: concise factories, typed implementation lists, lib-only collection and
dart run build_runner build
1.2.0 #
- feat: detect the library that provides
ThemeExtension(package:flutter/material.dartorpackage:material_ui/material_ui.dart) from the annotated code and use it in the generatedBuildContextextensions and theme lists - feat: add the
theme_importbuilder option to set that import explicitly - feat: fields without a
lerp(int,bool,String, enums, ...) now snap att = 0.5instead of producing code that does not compile - feat: templates with a second constructor, a generative constructor or positional parameters fail the build with a message that names the class
- fix:
debugFillPropertiesforboolfields usedFlagPropertypositionally and did not compile - fix:
hashCodeis built withObject.hashAllinstead of XOR, so swapped or equal field values no longer collide - fix: the generated theme list carries the same
ignore_for_fileheader as the context extensions and is formatted - fix:
Diagnosticabledetection matched any package whose name starts withflutter - fix: same-name templates whose paths nest no longer crash getter name resolution
- chore: allow analyzer 13 and 14 (
>=8.0.0 <15.0.0) and source_gen 4.3 - chore:
very_good_analysisremoved from the runtime dependencies - chore:
.theme_impl.jsonusesimportUrilike.theme_templates.json; the oldimportkey is still read - test: drop the analyzer-version-specific element mock in favor of
noSuchMethod - docs: document
theme_import, field interpolation rules and template constraints; fixoutput_groupsand builder names in the config examples
1.1.0 #
- chore: widen analyzer constraint to
>=8.0.0 <13.0.0(support analyzer 10, 11, 12 for Dart 3.10–3.12); generator code unchanged
1.0.1 #
- chore: allow analyzer 9.0.0
0.3.0 #
- refactor: migrate to element2 API and remove legacy analyzer usage
- chore: update dependencies for Dart 3.8 and latest build/codegen packages
- refactor: drop manual builder config validation in favor of fromMap
- test: clean up outdated mocks and migrate to TestReaderWriter-based tests
- test: update golden files for new codegen output
0.2.1 #
- chore: minor README updates and improved test coverage
0.2.0 #
- feat: migrate to standalone repository from monorepo
0.1.5 #
- chore(example): update structure and documentation
0.1.4 #
- fix: resolve builder integration issues
0.1.3 #
- chore: update CI config
- test: improved test coverage and added internal validation tests
0.1.2 #
- ci: added GitHub Actions
- docs: improved README and formatting
0.1.1 #
- feat: added library entrypoint to follow naming conventions
- docs: improved documentation and score compliance
- chore: minor cleanup and formatting
0.1.0 #
- initial release:
- Code generation for
ThemeExtensiontemplates and implementations - Support for context extensions and group-based splitting
- Customizable output via
build.yaml