withEmulator method
Returns settings for the Firestore emulator at host:port (without
TLS).
With a mockUserToken the requests are authenticated as that user
instead of the user of Firebase Auth, so that security rules can be
exercised: either a token string, or the claims of a Firebase ID token as
a map with at least a sub (or user_id) entry.
Implementation
Settings withEmulator(String host, int port, {Object? mockUserToken}) {
return Settings._(
_checked.withEmulator(host, port, mockUserToken: mockUserToken),
);
}