update method

  1. @override
Future<void> update(
  1. String topic, {
  2. int? expiry,
  3. Map<String, Namespace>? namespaces,
})
override

Implementation

@override
Future<void> update(
  String topic, {
  int? expiry,
  Map<String, Namespace>? namespaces,
}) async {
  checkInitialized();

  SessionData? info = get(topic);
  if (info == null) {
    return;
  }

  if (expiry != null) {
    info = info.copyWith(expiry: expiry);
  }
  if (namespaces != null) {
    info = info.copyWith(namespaces: namespaces);
  }

  await set(topic, info);
}