Add a public non-factory constructor for Property
It's not possible to sub-class Property from a non frappe library.
class Property<T> extends Reactable<T> {
Property._(Stream<T> stream, bool hasInitialValue, [T initialValue]) {
...
}
Property(Stream<T> stream) => this._(stream, false);
Property.withInitialValue(T initialValue, Stream<T> stream) => this._(stream, true, initialValue);
}
Deprecate factory constructors for Property.fromStream() and Property.fromStreamWithInitialValue().
:+1: for the feature and the discussion you guys had https://github.com/danschultz/frappe/issues/40
@danschultz I'm thinking about sending a pr. do you have a guideline I should follow?
@alexvbush, my plan was to add two new non-factory constructors Property(Stream<T> stream) and Property.withInitialValue(T initialValue, Stream<T> stream). This API is more inline with how the EventStream's constructor works.
Thanks for considering making a contribution. It's much appreciated!