Skip to content

Add a public non-factory constructor for Property #42

@danschultz

Description

@danschultz

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().

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions