decode method

  1. @override
Uint8List? decode(
  1. String? base64
)
override

Decodes a value of storage type TStore back to type T.

Returns null if the stored value is null or cannot be decoded.

Implementation

@override
Uint8List? decode(String? base64) {
  if (base64 == null) return null;
  try {
    return base64Decode(base64);
  } catch (_) {
    return null; // corrupted or invalid base64
  }
}