updateState method
Performs a shallow merge of partial into the current state's JSON
representation, rebuilds the state, and syncs to the other side.
Only top-level keys are merged; nested objects are replaced entirely.
Implementation
Future<void> updateState(Map<String, dynamic> partial) {
final current = _toJson(_state)..addAll(partial);
_state = _fromJson(current);
return FloatyChannel.sendSystem(_prefix, {
'full': false,
'data': partial,
});
}