getObject<T> method
Retrieve a generic object with type conversion
Implementation
Future<T?> getObject<T>(
String key,
T Function(Map<String, dynamic>) fromJson,
) async {
final map = await getMap(key);
if (map == null) return null;
try {
return fromJson(map);
} catch (e) {
throw SecureStorageException('Failed to convert object for key: $key', e);
}
}