UserDataService class

Implemented types

Constructors

UserDataService(AuthService _authService)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userDataDbProvider UserDataDbProvider
no setter

Methods

deleteUserData(String userId, {bool deleteAuthData = false}) Future<Map<String, dynamic>?>
delete user data without the auth data(user can still login) if deleteAuthData isn't changed
getUserData(String userId, {bool authDataMustExist = true}) Future<Map<String, dynamic>?>
getUserDataByEmail(String email, {bool authDataMustExist = true}) Future<Map<String, dynamic>?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setUserData(String userId, Map<String, dynamic> newDoc, {bool authDataMustExist = true}) Future<Map<String, dynamic>?>
sets the current user data to the newDoc remove the old document and add the newDoc instead (the _id can't be changed and can't be deleted) if the _id isn't presented in the newDoc no worries it will be the same if the user data doesn't exist it will create a new document with the provided user data
toString() String
A string representation of this object.
inherited
updateUserData(String userId, Map<String, dynamic> updateDoc) Future<Map<String, dynamic>?>
update user data with the updateDoc and returns the new updated user data map will override only the values presented in the update Doc and leave all other properties as they are (the _id can't be changed and can't be deleted) if the _id isn't presented in the newDoc no worries it will be the same if the user data doesn't exist it will create a new document with the provided user data

Operators

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