getDouble method

double getDouble(
  1. String key, {
  2. double defaultValue = 0.0,
})

Retrieve a double value for key.

If the key does not exist the defaultValue is returned.

Parameters

  • key: The key to look up.
  • defaultValue: Value returned when the key is missing (defaults to 0.0).

Returns

  • The stored double value, or defaultValue if not found.

Also see:

Implementation

double getDouble(final String key, {double defaultValue = 0.0}) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'SettingsService',
    'getValueDouble',
    args: <String, dynamic>{'first': key, 'second': defaultValue},
  );

  return resultString['result'];
}