Skip to content

PropertyController? #45

@jonaskello

Description

@jonaskello

Not sure I am doing this right but I feel the need for a PropertyController (or SignalController). I currently do:

  class SignalController {
    final Property signal;
    final StreamController controller;

    SignalController(this.signal, this.controller);
  }

   var controller = new StreamController();
   var signal = new Property.fromStream(controller.stream);
   var signalController = new SignalController(signal, controller);

I store the SignalController in order to return the Property to anyone who wants to subscribe, and also add new values to the Property. If this is the way it is supposed to play out, then maybe something like the SignalController could be added to the library?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions