getInt abstract method
Returns the int value associated with the key
, otherwise defaultValue
.
If key
does not exist in the JSON object, or if there is a specific default value that
you want to return when the value associated with key
is null, set it to the
argument defaultValue
.
Implementation
int getInt({
required String key,
int defaultValue = -1,
});