setState method

Future<void> setState(
  1. S newState
)

Replaces the entire state and syncs to the other side.

Implementation

Future<void> setState(S newState) {
  _state = newState;
  return FloatyChannel.sendSystem(_prefix, {
    'full': true,
    'data': _toJson(newState),
  });
}