FirebaseClient class

FirebaseClient wraps a REST client for a Firebase realtime database.

The client supports authentication and GET, PUT, POST, DELETE and PATCH methods.

Constructors

FirebaseClient(String? credential, {Client? client})
Creates a new FirebaseClient with credential and optional client.
FirebaseClient.anonymous({Client? client})
Creates a new anonymous FirebaseClient with optional client.

Properties

credential String?
Auth credential.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes the client and cleans up any associated resources.
delete(dynamic uri) Future<void>
Deletes data from database using a HTTP DELETE request. The response from a successful request contains a JSON with null.
get(dynamic uri) Future
Reads data from database using a HTTP GET request. The response from a successful request contains a data being retrieved.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(dynamic uri, dynamic json) Future
Updates specific children at a location without overwriting existing data using a HTTP PATCH request. The response from a successful request contains a data being written.
post(dynamic uri, dynamic json) Future
Pushes data to database using a HTTP POST request. The response from a successful request contains a key of the new data being added.
put(dynamic uri, dynamic json) Future
Writes or replaces data in database using a HTTP PUT request. The response from a successful request contains a data being written.
send(String method, dynamic url, {dynamic json}) Future<Object?>
Creates a request with a HTTP method, url and optional data. The url can be either a String or Uri.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited