MeteorClient class

Constructors

MeteorClient.connect({required String url, bool debug = false, dynamic userAgent = 'DartMeteor/2.0.4'})

Properties

connection DdpClient
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isAlreadyRunStartupFunctions bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
users Stream<Map<String, dynamic>>
A Map containing user documents.
no setter

Methods

apply(String name, List args) Future
Invoke a method passing an array of arguments.
call(String name, {List args = const []}) Future
Invoke a method passing an array of arguments.
changePassword(String oldPassword, String newPassword) Future
Change the current user's password. Must be logged in.
collection(String collectionName) Stream<Map<String, dynamic>>
Get Stream of collection on given a collectionName.
collectionCurrentValue(String collectionName) Map<String, dynamic>?
defer(Function func()) → void
disconnect() → void
Disconnect the client from the server.
forgotPassword(String email) Future
Request a forgot password email.
isClient() bool
Boolean variable. True if running in client environment.
isCordova() bool
Boolean variable. True if running in a Cordova mobile environment.
isDevelopment() bool
Boolean variable. True if running in development environment.
isProduction() bool
Boolean variable. True if running in production environment.
isServer() bool
Boolean variable. True if running in server environment.
loggingIn() Stream<bool>
True if a login method (such as Meteor.loginWithPassword, Meteor.loginWithFacebook, or Accounts.createUser) is currently in progress. A reactive data source.
login(Map<String, dynamic> loginData, {int delayOnLoginErrorSecond = 0}) Future<MeteorClientLoginResult>
logInStatus() Stream<UserLogInStatus>
Current log-in status of login methods (such as Meteor.loginWithPassword, Meteor.loginWithFacebook, or Accounts.createUser). A reactive data source.
loginWithPassword(String user, String password, {int delayOnLoginErrorSecond = 0}) Future<MeteorClientLoginResult>
Log the user in with a password.
loginWithToken({required String token, DateTime? tokenExpires}) Future<MeteorClientLoginResult?>
logout() Future
Log the user out.
logoutOtherClients() Future<MeteorClientLoginResult>
Log out other clients logged in as the current user, but does not log out the client that calls this function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reconnect() → void
Force an immediate reconnection attempt if the client is not connected to the server. This method does nothing if the client is already connected.
resetPassword(String token, String newPassword) Future
Reset the password for a user using a token received in email. Logs the user in afterwards.
startup(Function func) → void
Run code when a client successfully make a connection to server.
status() Stream<DdpConnectionStatus>
Get the current connection status.
subscribe(String name, {List args = const [], Function onStop(dynamic error)?, Function? onReady}) SubscriptionHandler
Subscribe to a record set. Returns a SubscriptionHandler that provides stop() and ready() methods.
toString() String
A string representation of this object.
inherited
user() Stream<Map<String, dynamic>?>
Get the current user record, or null if no user is logged in. A reactive data source.
userCurrentValue() Map<String, dynamic>?
userId() Stream<String?>
Get the current user id, or null if no user is logged in. A reactive data source.
userIdCurrentValue() String?

Operators

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