parent method
Gets a DatabaseReference for the parent location. If this instance refers to the root of your Firebase Database, it has no parent, and therefore parent() will return null.
Implementation
DatabaseReference? parent() {
if (_databaseReferencePlatform.pathComponents.isEmpty) {
return null;
}
return DatabaseReference._(_databaseReferencePlatform.parent()!);
}