W3MSession.fromMap constructor
USED TO READ THE SESSION FROM LOCAL STORAGE
Implementation
factory W3MSession.fromMap(Map<String, dynamic> map) {
final sessionDataString = map['sessionData'];
final coinbaseDataString = map['coinbaseData'];
final magicDataString = map['magicData'];
final siweSession = map['siweSession'];
return W3MSession(
sessionData: sessionDataString != null
? SessionData.fromJson(sessionDataString)
: null,
coinbaseData: coinbaseDataString != null
? CoinbaseData.fromJson(coinbaseDataString)
: null,
magicData:
magicDataString != null ? MagicData.fromJson(magicDataString) : null,
siweSession:
siweSession != null ? SIWESession.fromJson(siweSession) : null,
);
}