get<T> static method

T? get<T>(
  1. String key
)

Implementation

static T? get<T>(String key) {
  final raw = _p.getString('wt_session_$key');
  if (raw == null) return null;
  final decoded = WtSecurity.decode(raw, WtConfig.instance.secretKey);
  if (decoded == null) return null;
  try {
    return json.decode(decoded) as T;
  } catch (_) {
    return null;
  }
}