setState method
- @Deprecated('setState is deprecated. Use update((state) => newState) instead for a safer, reactive state update.')
inherited
Sets a new state of type T if different from the current state.
If the new state is equal to the current state, no update is performed.
Implementation
@Deprecated(
'setState is deprecated. Use update((state) => newState) instead for a safer, reactive state update.',
)
void setState(T newState, {JIntent? origin}) {
update((_) => newState, origin: origin);
}