purchaseState property

set purchaseState (PurchaseState value)

Sets the value and updates all Stream listeners

Also cleans all unused streams

Implementation

set purchaseState(PurchaseState value) {
  LinkFiveLogger.d("set purchaseState value $value");
  _purchaseState = value;

  // Clean streams
  _cleanStreams(_streamControllerPurchaseState);

  // send data to stream
  for (var element in _streamControllerPurchaseState) {
    if (element.hasListener) {
      element.add(_purchaseState);
    }
  }
}