fix: Fix issues with the maps being unmodifiable

This commit is contained in:
PapaTutuWawa 2022-09-14 22:02:50 +02:00
parent 4341797f14
commit 79704da99c

View File

@ -34,10 +34,13 @@ BTBVTrustState _trustFromInt(int i) {
/// See https://gultsch.de/trust.html for more details. /// See https://gultsch.de/trust.html for more details.
abstract class BlindTrustBeforeVerificationTrustManager extends TrustManager { abstract class BlindTrustBeforeVerificationTrustManager extends TrustManager {
BlindTrustBeforeVerificationTrustManager({ BlindTrustBeforeVerificationTrustManager({
this.trustCache = const {}, Map<RatchetMapKey, BTBVTrustState>? trustCache,
this.enablementCache = const {}, Map<RatchetMapKey, bool>? enablementCache,
this.devices = const {}, Map<String, List<int>>? devices,
}) : _lock = Lock(); }) : trustCache = trustCache ?? {},
enablementCache = enablementCache ?? {},
devices = devices ?? {},
_lock = Lock();
/// The cache for mapping a RatchetMapKey to its trust state /// The cache for mapping a RatchetMapKey to its trust state
@visibleForTesting @visibleForTesting