getDouble method
Returns the stored double, or defaultValue if the key does not exist.
Implementation
Future<double?> getDouble(String key, {double? defaultValue}) async {
try {
final raw = await _storage.read(key: key);
if (raw == null) return defaultValue;
return double.tryParse(raw) ?? defaultValue;
} catch (e, st) {
throw StorageException(
message: 'Failed to get double',
key: key,
cause: e,
stackTrace: st,
);
}
}