init method
Implementation
@override
Future<void> init() async {
if (!_initialized) {
logger.i('Initialized');
await _restore();
for (final value in _cached) {
if (value is ProposalStruct
// && value.proposer.publicKey != null
) {
map[value.id.toString() as K] = value;
} else if (value is SessionStruct
// && value.topic != null
) {
map[value.topic as K] = value;
} else if (value is PairingStruct) {
map[value.topic as K] = value;
}
// else if (getKey && value != null ) {
// map.set(getKey(value), value);
// }
}
_cached.clear();
_initialized = true;
}
}