get method
- Object field
Gets the value of a specific field.
Parameters:
field: The field to get (string or FieldPath).
Returns: The field value.
Example:
var value = snapshot.get('fieldName');
Implementation
dynamic get(Object field) {
final dynamic data = this._data ?? {};
if (field is FieldPath) {
field = field.getPath();
return Utils.getObjectProperty(data, field);
}
return data[field];
}