set<T> static method
Provides a shortcut for updating state of type T
.
This update can be mutable or immutable depending on if the setter call
method
returns the same type as T
.
This calls the underlying ReactiveController.setState method to update the state.
Implementation
static T set<T>(BuildContext context, [dynamic Function(T)? call]) {
final value = RS.getReactive<T>(context);
value.setState(call);
return value.state;
}