gets method
Change the value getter based on the current state S
.
Implementation
StateAsync<S, A> gets(A Function(S state) f) =>
StateAsync((state) async => Tuple2(f(state), state));
Change the value getter based on the current state S
.
StateAsync<S, A> gets(A Function(S state) f) =>
StateAsync((state) async => Tuple2(f(state), state));