getDouble method
Returns a session value as double by key
. Returns defaultVal
if the
conversion fails.
Implementation
double? getDouble(String key, [double? defaultVal]) {
final String? val = _data[key];
if (val == null) {
return defaultVal;
}
return double.tryParse(val) ?? defaultVal;
}