setState method
- dynamic state, {
- Keyset? keyset,
- String? using,
- Set<
String> channels = const {}, - Set<
String> channelGroups = const {},
inherited
Implementation
Future<SetUserStateResult> setState(dynamic state,
{Keyset? keyset,
String? using,
Set<String> channels = const {},
Set<String> channelGroups = const {}}) async {
keyset ??= keysets[using];
Ensure(keyset).isNotNull('keyset');
var payload = await parser.encode(state);
return defaultFlow<SetUserStateParams, SetUserStateResult>(
keyset: keyset,
core: this,
params: SetUserStateParams(keyset, payload,
channels: channels, channelGroups: channelGroups),
serialize: (object, [_]) => SetUserStateResult.fromJson(object));
}