ContactRepository class
Implementation of an AbstractContactRepository.
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- ContactRepository
- Implemented types
Constructors
- ContactRepository(GraphQlProvider _graphQlProvider, UserRepository _userRepo, VersionDriftProvider _sessionLocal, {required UserId me})
Properties
-
contacts
→ RxObsMap<
ChatContactId, RxChatContactImpl> -
Returns reactive map of all RxChatContacts stored.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNext → RxBool
-
Indicates whether the paginated have next page.
no setteroverride
- initialized → bool
-
Checks whether the controller has already been initialized.
no setterinherited
- isClosed → bool
-
Checks whether the controller has already been closed.
no setterinherited
- me → UserId
-
UserId of the currently authenticated MyUser.
final
- nextLoading → RxBool
-
Indicates whether a next page of the paginated is loading.
no setteroverride
-
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
-
paginated
→ RxObsMap<
ChatContactId, RxChatContactImpl> -
Returns reactive map of ChatContacts in the current pagination view.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
status
→ Rx<
RxStatus> -
Returns the initialization
RxStatus
of this repository and its paginated.final
Methods
-
$configureLifeCycle(
) → void -
inherited
-
changeContactName(
ChatContactId id, UserName name) → Future< void> -
Updates
name
of the specified ChatContact in the authenticated MyUser's address book.override -
createChatContact(
UserName name, UserId id) → Future< void> -
Creates a new ChatContact with the specified User in the current
MyUser's address book.
override
-
deleteContact(
ChatContactId id) → Future< void> -
Deletes the specified ChatContact from the authenticated MyUser's
address book.
override
-
favoriteChatContact(
ChatContactId id, ChatContactFavoritePosition? position) → Future< void> -
Marks the specified ChatContact as favorited for the authenticated
MyUser and sets its position in the favorites list.
override
-
get(
ChatContactId id) → FutureOr< RxChatContact?> -
Returns a ChatContact by the provided
id
.override -
next(
) → Future< void> -
Fetches the next paginated page.
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(
) → Future< void> -
Called immediately after the widget is allocated in memory.
You might use this to initialize something for the controller.
override
-
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
-
remove(
ChatContactId id) → Future< void> -
Removes a ChatContact identified by the provided
id
. -
search(
{UserName? name, UserEmail? email, UserPhone? phone}) → Paginated< ChatContactId, RxChatContact> -
Searches ChatContacts by the given criteria.
override
-
searchByEmail(
UserEmail email) → Future< RxChatContact?> - Searches ChatContacts by the provided UserEmail.
-
searchByName(
UserName name, {ChatContactsCursor? after, int? first}) → Future< Page< RxChatContact, ChatContactsCursor> > - Searches ChatContacts by the provided UserName.
-
searchByPhone(
UserPhone phone) → Future< RxChatContact?> - Searches ChatContacts by the provided UserPhone.
-
toString(
) → String -
A string representation of this object.
inherited
-
unfavoriteChatContact(
ChatContactId id) → Future< void> -
Removes the specified ChatContact from the favorites list of the
authenticated MyUser.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited