getBool method
Retrieve a bool 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 tofalse).
Returns
- The stored boolean value, or
defaultValueif not found.
Also see:
- setBool: to store a boolean value.
Implementation
bool getBool(final String key, {bool defaultValue = false}) {
final OperationResult resultString = objectMethod(
pointerId,
'SettingsService',
'getValueBool',
args: <String, dynamic>{'first': key, 'second': defaultValue},
);
return resultString['result'];
}