wrapUpdates<Value> method

StateStream<Value> wrapUpdates<Value>(
  1. Value mapper(
    1. State
    )
)

StateStream object for updates with given mapper for instance state

mapper - mapper function to get exact state field to listen to

late final posts = postsInteractor.wrapUpdates((state) => state.posts);

Implementation

StateStream<Value> wrapUpdates<Value>(Value Function(State) mapper) {
  return StateStream(updates(mapper), () => mapper(state));
}