getString method

String getString(
  1. String key, {
  2. String defaultValue = '',
})

Retrieve a String 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 '').

Returns

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

Also see:

Implementation

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

  return resultString['result'];
}