update method
Future<void>
update(
- String topic, {
- int? expiry,
- bool? active,
- PairingMetadata? metadata,
override
Implementation
@override
Future<void> update(
String topic, {
int? expiry,
bool? active,
PairingMetadata? metadata,
}) async {
checkInitialized();
PairingInfo? info = get(topic);
if (info == null) {
return;
}
if (expiry != null) {
info = info.copyWith(expiry: expiry);
}
if (active != null) {
info = info.copyWith(active: active);
}
if (metadata != null) {
info = info.copyWith(peerMetadata: metadata);
}
await set(topic, info);
}