UserRepository class
Implementation of an AbstractUserRepository.
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- UserRepository
- Implemented types
Constructors
- UserRepository(GraphQlProvider _graphQlProvider, UserDriftProvider _userLocal)
Properties
-
getChat
↔ FutureOr<
RxChat?> Function(ChatId id)? -
Callback, called when a RxChat with the provided ChatId is required
by this UserRepository.
getter/setter pair
-
getContact
↔ FutureOr<
RxChatContact?> Function(ChatContactId id)? -
Callback, called when a RxChatContact with the provided ChatContactId
is required by this UserRepository.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialized → bool
-
Checks whether the controller has already been initialized.
no setterinherited
- isClosed → bool
-
Checks whether the controller has already been closed.
no setterinherited
-
onDelete
→ InternalFinalCallback<
void> -
Internal callback that starts the cycle of this controller.
finalinherited
-
onStart
→ InternalFinalCallback<
void> -
Called at the exact moment the widget is allocated in memory.
It uses an internal "callable" type, to avoid any @overrides in subclases.
This method should be internal and is required to define the
lifetime cycle of the subclass.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
users
→ RxMap<
UserId, RxUserImpl> -
Returns reactive map of Users.
final
Methods
-
$configureLifeCycle(
) → void -
inherited
-
addContact(
ChatContact contact, UserId userId) → Future< void> - Adds the provided ChatContactId to the User.contacts with the specified UserId.
-
blockUser(
UserId id, BlocklistReason? reason) → Future< void> -
Blocks the specified User for the authenticated MyUser.
override
-
get(
UserId id) → FutureOr< RxUserImpl?> -
Returns an User by the provided
id
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClose(
) → void -
Called before onDelete method. onClose might be used to
dispose resources used by the controller. Like closing events,
or streams before the controller is destroyed.
Or dispose objects that can potentially create some memory leaks,
like TextEditingControllers, AnimationControllers.
Might be useful as well to persist some data on disk.
override
-
onInit(
) → void -
Called immediately after the widget is allocated in memory.
You might use this to initialize something for the controller.
inherited
-
onReady(
) → void -
Called 1 frame after onInit(). It is the perfect place to enter
navigation events, like snackbar, dialogs, or a new route, or
async request.
inherited
-
put(
DtoUser user, {bool ignoreVersion = false}) → Future< void> -
Puts the provided
user
into the local storage. -
removeContact(
ChatContactId contactId, UserId userId) → Future< void> - Removes the provided ChatContactId from the User.contacts with the specified UserId.
-
search(
{UserNum? num, UserName? name, UserLogin? login, ChatDirectLinkSlug? link}) → Paginated< UserId, RxUser> -
Searches Users by the given criteria.
override
-
searchByLink(
ChatDirectLinkSlug link) → Future< RxUser?> - Searches Users by the provided ChatDirectLinkSlug.
-
searchByLogin(
UserLogin login) → Future< RxUser?> - Searches Users by the provided UserLogin.
-
searchByName(
UserName name, {UsersCursor? after, int? first}) → Future< Page< RxUser, UsersCursor> > - Searches Users by the provided UserName.
-
searchByNum(
UserNum num) → Future< RxUser?> - Searches Users by the provided UserNum.
-
toString(
) → String -
A string representation of this object.
inherited
-
unblockUser(
UserId id) → Future< void> -
Removes the specified User from the blocklist of the authenticated
MyUser.
override
-
update(
User user) → Future< void> -
Updates the locally stored DtoUser with the provided
user
value. -
userEvents(
UserId id, Future< UserVersion?> ver()) → Future<Stream< UserEvents> > - Returns a Stream of UserEvents of the specified User.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited