load method

  1. @override
Future<T?> load()
override

Implementation

@override
Future<T?> load() async {
  try {
    final bytes = await read(key);
    if (bytes == null) return null;
    return fromBytes(bytes);
  } catch (e) {
    if (kDebugMode) print('BinaryPersistence load error: $e');
    return null;
  }
}