FirebaseDatabase.unauthenticated constructor
FirebaseDatabase.unauthenticated({
- required Client client,
- required String database,
- String basePath = '',
- Timeout? timeout,
- WriteSizeLimit? writeSizeLimit,
Constructs a database without a user
This constructor needs a database
, the name of the database to connect
to. If you want to connect to a database with an authenticated user, use
FirebaseDatabase() instead.
The client
is required here and used to create the api. If the
explicit client is a SSEClient, that one is used for the API. Otherwise
a wrapper is created around client
to provide the SSE features.
By default, the database will connect to the root path of the server
database. If you want to connect to a subset of the database, use
basePath
to only connect to that part. This path will also be the path
of the rootStore.
In addition, you can use timeout
and writeSizeLimit
to configure the
corresponding values of the newly created RestApi.
Implementation
FirebaseDatabase.unauthenticated({
required Client client,
required String database,
String basePath = '',
Timeout? timeout,
WriteSizeLimit? writeSizeLimit,
}) : this.api(
RestApi(
client: client,
database: database,
basePath: basePath,
timeout: timeout,
writeSizeLimit: writeSizeLimit,
),
);