modify method
Change the current state S
using f
and return nothing (Unit).
Implementation
StateAsync<S, Unit> modify(S Function(S state) f) =>
StateAsync((state) async => (unit, f(state)));
Change the current state S
using f
and return nothing (Unit).
StateAsync<S, Unit> modify(S Function(S state) f) =>
StateAsync((state) async => (unit, f(state)));