databaseUrl property
The URL of the database, normalised: https://<host> with the host in lowercase and without
the default port, followed by ?ns=<namespace> when the host does not name the namespace (a
custom domain, or a ?ns= that differs from the first host label). With an emulator it is
http://<host>:<port>?ns=<namespace> (https for *.cloudworkstations.dev), whatever host
the constructor's databaseUrl argument names: FirebaseDatabase.emulator with
host: '10.0.2.2', port: 9000 and databaseUrl: 'http://localhost:9000?ns=demo' gives
http://10.0.2.2:9000?ns=demo. Every
spelling of one production URL with a host name gives the same value. A loopback host and an
emulator host are kept as written (lowercased), so localhost, 127.0.0.1, [::1] and
[0:0:0:0:0:0:0:1] give four values for one server. Two databases can share one value on a
*.cloudworkstations.dev host: a production database with ?ns= and the emulator at port 443
with that namespace. It keys the persisted cache (pass it to clearSqlitePersistence).
Implementation
Uri get databaseUrl => _target.databaseUrl;