updateSession method

  1. @override
Future<void> updateSession({
  1. required String topic,
  2. required Map<String, Namespace> namespaces,
})
override

Implementation

@override
Future<void> updateSession({
  required String topic,
  required Map<String, Namespace> namespaces,
}) async {
  _checkInitialized();
  _confirmOnlineStateOrThrow();

  await _isValidUpdate(
    topic,
    namespaces,
  );

  await sessions.update(
    topic,
    namespaces: namespaces,
  );

  final updateRequest = WcSessionUpdateRequest(
    namespaces: namespaces,
  );

  await core.pairing.sendRequest(
    topic,
    MethodConstants.WC_SESSION_UPDATE,
    updateRequest.toJson(),
  );
}