App class Application

An App is the main client-side entry point for interacting with an Atlas App Services application.

The App can be used to

  • Register uses and perform various user-related operations through authentication providers
  • Synchronize data between the local device and a remote Realm App with Synchronized Realms
Implemented types

Constructors

App(AppConfiguration configuration)
Create an app with a particular AppConfiguration

Properties

currentUser User?
Gets the currently logged in User. If none exists, null is returned.
read-only
emailPasswordAuthProvider EmailPasswordAuthProvider
Returns an instance of EmailPasswordAuthProvider
read-only
hashCode int
The hash code for this object.
read-onlyinherited
id String
The id of this application. This is the same as the appId in the AppConfiguration used to create this App.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
users Iterable<User>
Gets all currently logged in users.
read-only

Methods

deleteUser(User user) Future<void>
Deletes a user and all its data from the device as well as the server.
logIn(Credentials credentials) Future<User>
Logs in a user with the given credentials.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reconnect() → void
Provide a hint to this app's sync client to reconnect. Useful when the device has been offline and then receives a network reachability update.
removeUser(User user) Future<void>
Removes a user and their local data from the device. If the user is logged in, they will be logged out in the process.
switchUser(User user) → void
Switches the currentUser to the one specified in user.
toString() String
A string representation of this object.
inherited

Operators

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