getLong abstract method
Gets a 64-bit integer value.
Returns defaultValue if the key is missing or the stored type is not long.
key Lookup key.
defaultValue Value to return when not found or type mismatch.
Returns Stored int64 or defaultValue.
Example:
// Retrieve long values with defaults
long regTimestamp = _userStorage!.getLong("registration_timestamp", 0);
long lastLogin = _userStorage!.getLong("last_login_timestamp", 0);
long nonExistentLong = _userStorage!.getLong("non_existent_long", -1);
print("Registration timestamp: $regTimestamp");
print("Last login timestamp: $lastLogin");
print("Non-existent long: $nonExistentLong");
Implementation
int getLong(String key, int defaultValue);