get<T> method
Get a value of type T
associated with a given key
Returns null or defaultValue
if provided.
Implementation
T? get<T>(String key, {T? defaultValue}) {
if (_getObjectData().containsKey(key)) {
final result = _getObjectData()[key];
if (result is _Valuable) {
return result.getValue() as T?;
}
if (result is _ParseRelation) {
return (result
..parent = (this as ParseObject)
..key = key) as T?;
}
return result as T?;
} else {
return defaultValue;
}
}