getInt method
Retrieve a 32-bit int 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 to0).
Returns
- The stored integer value, or
defaultValueif not found.
Also see:
- setInt: to store a integer value.
Implementation
int getInt(final String key, {int defaultValue = 0}) {
final OperationResult resultString = objectMethod(
pointerId,
'SettingsService',
'getValueInt',
args: <String, dynamic>{'first': key, 'second': defaultValue},
);
return resultString['result'];
}