OnDisconnectPlatform class abstract
The onDisconnect
class allows you to write or clear data when your client disconnects from the Database server.
These updates occur whether your client disconnects cleanly or not, so you can rely on them to clean up data even if a connection is dropped or a client crashes.
- Inheritance
-
- Object
- PlatformInterface
- OnDisconnectPlatform
Constructors
- OnDisconnectPlatform({required DatabasePlatform database, required DatabaseReferencePlatform ref})
- Create a OnDisconnectPlatform instance
Properties
- database → DatabasePlatform
-
The Database instance associated with this OnDisconnectPlatform class
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- ref → DatabaseReferencePlatform
-
The DatabaseReference instance associated with this OnDisconnectPlatform class
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → Future< void> - Cancels all previously queued onDisconnect() set or update events for this location and all children.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
) → Future< void> - Ensures the data at this location is deleted when the client is disconnected
-
set(
Object? value) → Future< void> - Ensures the data at this location is set to the specified value when the client is disconnected
-
setWithPriority(
Object? value, Object? priority) → Future< void> - Ensures the data at this location is set with a priority to the specified value when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Map< String, Object?> value) → Future<void> - Writes multiple values at this location when the client is disconnected
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
verify(
OnDisconnectPlatform instance) → void -
Throws an AssertionError if
instance
does not extend OnDisconnectPlatform.override