subject 2.0.0
subject: ^2.0.0 copied to clipboard
Automatically generates an observable interface for any class. Observer Pattern implementation for Dart, generalized using mixins and multiple alternative interfaces.
2.0.0 #
BREAKING CHANGE:
The way the generated classes and mixins are used has changed.
The
Observable${className}mixin will have the.on()and.onBefore()methods, while the${className}Subjectclass will have the necessary overrides to make the mixin work.The generator was refactored to make it easier to add new features and fix bugs.
Added:
syncoption toSubjectWithto change its synchronous behavior
Changed:
- The generated classes and mixins are now used differently, the generated mixin is the interface, the generated class is the overriding wrapper
- Renamed
observableproperty in the generatedSubjectclass tosubject
Fixed:
- Subject properties were not being generated correctly, they were unable to be used
1.1.1 #
Fixed:
.onBefore()wasn't called before, because of asyncronousStreamControllerinitialization
1.1.0 #
Added:
SubjectWithannotation to generateSubjectclasses with custom properties, such as subject and mixin names
1.0.6 #
Fixed:
- Made
subject:buildandsubject:watchcommands use--delete-conflicting-outputsto avoid conflicts withbuild_runner
1.0.5 #
Fixed:
- Inverted
isGeneratorInstalled()check, when usingsubject:buildandsubject:watchcommands
1.0.4 #
Fixed:
onErrorcallback not returning the correct value, when usingsubject:buildandsubject:watchcommands
1.0.3 #
Fixed:
- Not nullable generic, when using
subject:buildandsubject:watchcommands
1.0.2 #
Changed:
- Improved
subject:buildandsubject:watchcommands
Fixed:
- Get dependencies after installing the
subject_genpackage, when usingsubject:buildandsubject:watchcommands - Correct awaiting, when using
subject:buildandsubject:watchcommands
1.0.1 #
Fixed:
- Documentation image URL and
CHANGELOG.md
1.0.0 #
BREAKING CHANGES:
The package was split into two packages,
subjectandsubject_gen, to keep dependencies to a minimum.In the process of refactoring, a lot of the code was rewritten, the API was changed to be more consistent and fix some issues.
Added:
- Split into
subject_genpackage to generateSubjectclasses, and keep dependencies to a minimum - Build commands,
dart run subject:buildanddart run subject:watch, to install and run the code generator
Changed:
- Return type of
.onand.onBeforeis nowSubjectSubscriptioninstead ofSubjectObserver
0.1.4 #
Added:
- Package logo and screenshots
Fixed:
Observer.streamarguments were not being passed to theStreamObserverconstructor
0.1.3 #
Changed:
- Improved documentation
0.1.2 #
Changed:
- Documentation to help with setting up the Code Generator
- Minor documentation improvements
0.1.1 #
Fixed:
- Builder name changed from
observer:subjecttosubject:build
0.1.0 #
Added:
- Annotation
@dontObserveto exclude elements from being observed when using@subject
0.0.2 #
Changed:
- Improved documentation
0.0.1 #
Initial release: Subject
