GraphQlProvider class
Provider of backend GraphQL API.
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- GraphQlProviderBase
- GraphQlProvider
- Mixed-in types
Constructors
Properties
-
authExceptionHandler
← Future<
void> Function(AuthorizationException)? -
Sets callback, called when middleware catches AuthorizationException.
no getterinherited
- client → GraphQlClient
-
Returns
GraphQLClientwith or without authorization.no setterinherited - clientGuard → Mutex
-
Returns mutex guarding the client.
no setterinherited
- connected → RxBool
-
Indicates whether this GraphQlClient is successfully connected to the
endpoint.
no setterinherited
- 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
- token ↔ AccessTokenSecret?
-
Returns authorization bearer token.
getter/setter pairinherited
Methods
-
$configureLifeCycle(
) → void -
inherited
-
addChatMember(
ChatId chatId, UserId userId) → Future< ChatEventsVersionedMixin?> -
Adds an User to a Chat-group by the authority of the authenticated
MyUser.
inherited
-
addListener(
void handler(Exception?)) → void -
Registers the provided
handlerto listen to Exceptions happening with the queries.inherited -
addUserEmail(
UserEmail email, {ConfirmationCode? confirmation, RawClientOptions? raw, String? locale}) → Future< MyUserEventsVersionedMixin?> -
Adds a new email address for the authenticated MyUser.
inherited
-
addUserPhone(
UserPhone phone, {ConfirmationCode? confirmation, String? locale}) → Future< MyUserEventsVersionedMixin?> -
Adds a new phone number for the authenticated MyUser.
inherited
-
attachments(
ChatItemId id) → Future< GetAttachments$Query> -
Returns the Attachments of a ChatItem identified by the provided
id.inherited -
avatar(
ChatId id) → Future< GetAvatar$Query> -
Fetches the ChatAvatars of a Chat identified by the provided
id.inherited -
blocklistEvents(
BlocklistVersion? ver()) → Stream< QueryResult< Object?> > -
Subscribes to BlocklistEvents of the authenticated MyUser.
inherited
-
blockUser(
UserId id, BlocklistReason? reason) → Future< BlocklistEventsVersionedMixin?> -
Blocks the specified User for the authenticated MyUser.
inherited
-
callEvents(
ChatItemId id, ChatCallDeviceId deviceId) → Stream< QueryResult< Object?> > -
Subscribes to ChatCallEvents of a ChatCall.
inherited
-
changeContactName(
ChatContactId id, UserName name) → Future< ChatContactEventsVersionedMixin> -
Updates the
nameof the specified ChatContact in the authenticated MyUser's address book.inherited -
chatContact(
ChatContactId id) → Future< GetContact$Query> -
Returns a ChatContact by its ID.
inherited
-
chatContacts(
{int? first, ChatContactsCursor? after, int? last, ChatContactsCursor? before, bool noFavorite = false}) → Future< Contacts$Query$ChatContacts> -
Returns address book of the authenticated MyUser ordered alphabetically
by ChatContact names.
inherited
-
chatEvents(
ChatId id, ChatVersion? ver, FutureOr< ChatVersion?> onVer(), {int priority = -10}) → Stream<QueryResult< Object?> > -
Subscribes to ChatEvents of the specified Chat.
inherited
-
chatItem(
ChatItemId id) → Future< GetMessage$Query> -
Returns a ChatItem by its ID.
inherited
-
chatItems(
ChatId id, {int? first, ChatItemsCursor? after, int? last, ChatItemsCursor? before, ChatItemsFilter? filter}) → Future< GetMessages$Query> -
Fetches ChatItems of a Chat identified by its
idordered by their posting time.inherited -
chatMembers(
ChatId id, {int? first, ChatMembersCursor? after, int? last, ChatMembersCursor? before}) → Future< GetMembers$Query> -
Fetches ChatMembers of a Chat identified by its
idordered by their joining time.inherited -
clearCache(
) → void -
Clears the cache attached to the client.
inherited
-
clearChat(
ChatId id, ChatItemId untilId) → Future< ChatEventsVersionedMixin?> -
Clears an existing Chat (hides all its ChatItems) for the
authenticated MyUser until the specified ChatItem inclusively.
inherited
-
contactsEvents(
ChatContactsListVersion? ver()) → Stream< QueryResult< Object?> > -
Subscribes to ChatContactEvents of all ChatContacts of the
authenticated MyUser.
inherited
-
createChatContact(
{required UserName name, List< ChatContactRecord> ? records}) → Future<ChatContactEventsVersionedMixin> -
Creates a new ChatContact in the authenticated MyUser's address book.
inherited
-
createChatDirectLink(
ChatDirectLinkSlug slug, {ChatId? groupId}) → Future< ChatEventsVersionedMixin?> -
Creates a new ChatDirectLink with the specified ChatDirectLinkSlug and
deletes the current active ChatDirectLink of the given Chat-group.
inherited
-
createConfirmationCode(
MyUserIdentifier identifier, {String? locale}) → Future< void> -
Generates and sends a new single-use ConfirmationCode for the MyUser
identified by the provided MyUserIdentifier.
inherited
-
createDialogChat(
UserId responderId) → Future< ChatMixin> -
Creates a Chat-dialog with the provided
responderIdfor the authenticated MyUser.inherited -
createGroupChat(
List< UserId> memberIds, {ChatName? name}) → Future<ChatMixin> -
Creates a Chat-group with the provided Users as members and the
authenticated MyUser.
inherited
-
createMonologChat(
{ChatName? name, bool? isHidden}) → Future< ChatMixin> -
Creates a Chat-monolog for the authenticated MyUser.
inherited
-
createUserDirectLink(
ChatDirectLinkSlug slug) → Future< MyUserEventsVersionedMixin?> -
Creates a new ChatDirectLink with the specified ChatDirectLinkSlug and
deletes the current active ChatDirectLink of the authenticated MyUser
(if any).
inherited
-
declineChatCall(
ChatId chatId) → Future< ChatEventsVersionedMixin?> -
Declines the ongoing ChatCall in the specified Chat by the
authenticated MyUser.
inherited
-
deleteChatContact(
ChatContactId id) → Future< DeleteChatContact$Mutation> -
Deletes the specified ChatContact from the authenticated MyUser's
address book.
inherited
-
deleteChatDirectLink(
{ChatId? groupId}) → Future< ChatEventsVersionedMixin?> -
Deletes the current ChatDirectLink of the given Chat-group.
inherited
-
deleteChatForward(
ChatItemId id) → Future< ChatEventsVersionedMixin?> -
Deletes the specified ChatForward posted by the authenticated MyUser.
inherited
-
deleteChatMessage(
ChatItemId id) → Future< ChatEventsVersionedMixin?> -
Deletes the specified ChatMessage posted by the authenticated MyUser.
inherited
-
deleteMyUser(
{MyUserCredentials? confirmation}) → Future< MyUserEventsVersionedMixin> -
Deletes the authenticated MyUser completely.
inherited
-
deleteSession(
{SessionId? id, MyUserCredentials? confirmation, AccessTokenSecret? token}) → Future< void> -
Destroys the specified Session of the authenticated MyUser, or the
current one (if the
idargument is not provided).inherited -
deleteUserDirectLink(
) → Future< MyUserEventsVersionedMixin?> -
Deletes the current ChatDirectLink of the authenticated MyUser.
inherited
-
disconnect(
) → void -
Disconnects the client and disposes the connection.
inherited
-
editChatMessage(
ChatItemId id, {ChatMessageTextInput? text, ChatMessageAttachmentsInput? attachments, ChatMessageRepliesInput? repliesTo}) → Future< ChatEventsVersionedMixin?> -
Edits a ChatMessage by the authenticated MyUser with the provided
text/attachments/repliesTo(at least one of three must be specified).inherited -
favoriteChat(
ChatId id, ChatFavoritePosition position) → Future< ChatEventsVersionedMixin?> -
Marks the specified Chat as favorited for the authenticated MyUser and
sets its
positionin the favorites list.inherited -
favoriteChatContact(
ChatContactId id, ChatContactFavoritePosition position) → Future< ChatContactEventsVersionedMixin?> -
Marks the specified ChatContact as favorited for the authenticated
MyUser and sets its position in the favorites list.
inherited
-
favoriteChatContacts(
{int? first, FavoriteChatContactsCursor? after, int? last, FavoriteChatContactsCursor? before}) → Future< FavoriteContacts$Query$FavoriteChatContacts> -
Returns favorited ChatContacts of the authenticated MyUser ordered by
the custom order of MyUser's favorites list (using
ChatContact.favoritePosition field).
inherited
-
favoriteChats(
{int? first, FavoriteChatsCursor? after, int? last, FavoriteChatsCursor? before}) → Future< FavoriteChats$Query> -
Returns favorite Chats of the authenticated MyUser ordered by the
custom order of MyUser's favorites list (using Chat.favoritePosition
field).
inherited
-
favoriteChatsEvents(
FavoriteChatsListVersion? ver()) → Stream< QueryResult< Object?> > -
Subscribes to FavoriteChatsEvents of all Chats of the authenticated
MyUser.
inherited
-
forwardChatItems(
ChatId from, ChatId to, List< ChatItemQuoteInput> items, {ChatMessageText? text, List<AttachmentId> ? attachments}) → Future<ChatEventsVersionedMixin?> -
Forwards ChatItems to the specified Chat by the authenticated
MyUser.
inherited
-
getBlocklist(
{int? first, BlocklistCursor? after, int? last, BlocklistCursor? before}) → Future< GetBlocklist$Query$Blocklist> -
Returns Users blocked by this MyUser as BlocklistRecords.
inherited
-
getChat(
ChatId id) → Future< GetChat$Query> -
Returns a Chat by its ID.
inherited
-
getMonolog(
) → Future< ChatMixin?> -
Returns the monolog Chat of the authenticated MyUser.
inherited
-
getMyUser(
{bool raw = false}) → Future< GetMyUser$Query> -
Returns the current authenticated MyUser.
inherited
-
getUser(
UserId id) → Future< GetUser$Query> -
Returns an User by its
id.inherited -
hideChat(
ChatId chatId) → Future< ChatEventsVersionedMixin?> -
Marks the specified Chat as hidden for the authenticated MyUser.
inherited
-
hideChatItem(
ChatItemId id) → Future< ChatEventsVersionedMixin?> -
Hides the specified ChatItem for the authenticated MyUser.
inherited
-
incomingCalls(
{int? first, IncomingChatCallsCursor? after, int? last, IncomingChatCallsCursor? before}) → Future< IncomingCalls$Query$IncomingChatCalls> -
Returns a list of incoming ChatCalls of the authenticated MyUser.
inherited
-
incomingCallsTopEvents(
int count) → Stream< QueryResult< Object?> > -
Subscribes to updates of top
countitems of incomingCalls list.inherited -
joinChatCall(
ChatId chatId, ChatCallCredentials creds) → Future< JoinCall$Mutation$JoinChatCall$JoinChatCallOk> -
Joins the ongoing ChatCall in the specified Chat by the authenticated
MyUser.
inherited
-
keepOnline(
) → Stream< QueryResult< Object?> > -
Keeps the authenticated MyUser online while subscribed.
inherited
-
keepTyping(
ChatId id) → Stream< QueryResult< Object?> > -
Notifies ChatMembers about the authenticated MyUser typing in the
specified Chat at the moment.
inherited
-
leaveChatCall(
ChatId chatId, ChatCallDeviceId deviceId) → Future< ChatEventsVersionedMixin?> -
Leaves the ongoing ChatCall in the specified Chat by the authenticated
MyUser.
inherited
-
myUserEvents(
Future< MyUserVersion?> ver()) → Future<Stream< QueryResult< >Object?> > -
Subscribes to MyUserEvents of the authenticated MyUser.
inherited
-
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.
inherited
-
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
-
postChatMessage(
ChatId chatId, {ChatMessageText? text, List< AttachmentId> ? attachments, List<ChatItemId> repliesTo = const []}) → Future<ChatEventsVersionedMixin?> -
Posts a new ChatMessage to the specified Chat by the authenticated
MyUser.
inherited
-
readChat(
ChatId chatId, ChatItemId untilId) → Future< ChatEventsVersionedMixin?> -
Marks the specified Chat as read for the authenticated MyUser until
the specified ChatItem inclusively.
inherited
-
recentChats(
{int? first, RecentChatsCursor? after, int? last, RecentChatsCursor? before, bool noFavorite = false, bool archived = false, bool? withOngoingCalls}) → Future< RecentChats$Query> -
Returns non-hidden Chats of the authenticated MyUser ordered
descending by their last updating DateTime.
inherited
-
recentChatsTopEvents(
int count, {bool noFavorite = true, bool archived = false, bool? withOngoingCalls}) → Stream< QueryResult< Object?> > -
Subscribes to updates of top
countitems of recentChats list.inherited -
reconnect(
) → Future< void> -
Reconnects the client right away if the token mismatch is detected.
inherited
-
redialChatCallMember(
ChatId chatId, UserId memberId) → Future< ChatCallEventsVersionedMixin?> -
Redials a User who left or declined the ongoing ChatCall in the
specified Chat-group by the authenticated MyUser.
inherited
-
refreshSession(
RefreshTokenSecret secret, {RefreshSessionSecretsInput? input}) → Future< RefreshSession$Mutation> -
Refreshes a Session of the MyUser identified by the provided
RefreshTokenSecret.
inherited
-
registerPushDevice(
PushDeviceToken token, String? locale) → Future< void> -
Registers a device (Android, iOS, or Web) for receiving notifications via
Firebase Cloud Messaging.
inherited
-
removeChatCallMember(
ChatId chatId, UserId userId) → Future< ChatEventsVersionedMixin?> -
Removes the specified User from the ChatCall of the specified
Chat-group by authority of the authenticated MyUser.
inherited
-
removeChatMember(
ChatId chatId, UserId userId) → Future< ChatEventsVersionedMixin?> -
Removes an User from a Chat-group by the authority of the
authenticated MyUser.
inherited
-
removeListener(
void handler(Exception?)) → void -
Unregisters the provided
handlerfrom listening to Exceptions happening with the queries.inherited -
removeUserEmail(
UserEmail email, {MyUserCredentials? confirmation}) → Future< MyUserEventsVersionedMixin?> -
Deletes the given
emailfrom MyUser.emails of the authenticated MyUser.inherited -
removeUserPhone(
UserPhone phone, {MyUserCredentials? confirmation}) → Future< MyUserEventsVersionedMixin?> -
Deletes the given
phonefrom MyUser.phones for the authenticated MyUser.inherited -
renameChat(
ChatId id, ChatName? name) → Future< ChatEventsVersionedMixin?> -
Renames the specified Chat by authority of the authenticated MyUser.
inherited
-
searchChatContacts(
{UserName? name, UserEmail? email, UserPhone? phone, int? first, ChatContactsCursor? after, int? last, ChatContactsCursor? before}) → Future< SearchChatContacts$Query> -
Searches ChatContacts by the given criteria.
inherited
-
searchUsers(
{UserNum? num, UserLogin? login, ChatDirectLinkSlug? link, UserName? name, int? first, UsersCursor? after, int? last, UsersCursor? before}) → Future< SearchUsers$Query> -
Searches Users by the given criteria.
inherited
-
sessions(
) → Future< List< SessionMixin> > -
Returns all active Sessions of the authenticated MyUser.
inherited
-
sessionsEvents(
SessionsListVersion? ver()) → Stream< QueryResult< Object?> > -
Subscribes to SessionEvents of all Sessions of the authenticated
MyUser.
inherited
-
signIn(
{required MyUserCredentials credentials, required MyUserIdentifier identifier}) → Future< SignIn$Mutation$CreateSession$CreateSessionOk> -
Creates a new Session for the MyUser identified by the provided
MyUserIdentifier.
inherited
-
signUp(
{UserLogin? login, UserPassword? password}) → Future< SignUp$Mutation$CreateUser> -
Creates a new MyUser having only
idand uniquenumfields, along with a Session for him (valid for the returned expiration).inherited -
startChatCall(
ChatId chatId, ChatCallCredentials creds, [bool? withVideo]) → Future< StartCall$Mutation$StartChatCall$StartChatCallOk> -
Starts a new ChatCall in the specified Chat by the authenticated
MyUser.
inherited
-
toggleChatArchivation(
ChatId chatId, bool archive) → Future< ChatEventsVersionedMixin?> -
Archive or unarchive the specified Chat for the authenticated MyUser.
inherited
-
toggleChatCallHand(
ChatId chatId, ChatCallDeviceId deviceId, bool raised) → Future< ChatCallEventsVersionedMixin?> -
Raises/lowers a hand of the authenticated MyUser in the specified
ChatCall.
inherited
-
toggleChatMute(
ChatId id, Muting? mute) → Future< ChatEventsVersionedMixin?> -
Mutes or unmutes the specified Chat for the authenticated MyUser.
Overrides an existing mute even if it's longer.
inherited
-
toggleMyUserMute(
Muting? mute) → Future< MyUserEventsVersionedMixin?> -
Mutes or unmutes all the Chats of the authenticated MyUser. Overrides
any already existing mute even if it's longer.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transformDialogCallIntoGroupCall(
ChatId chatId, ChatCallDeviceId deviceId, List< UserId> additionalMemberIds, ChatName? groupName) → Future<ChatEventsVersionedMixin?> -
Moves an ongoing ChatCall in a Chat-dialog to a newly created
Chat-group, optionally adding new members.
inherited
-
unblockUser(
UserId id) → Future< BlocklistEventsVersionedMixin?> -
Removes the specified User from the blocklist of the authenticated
MyUser.
inherited
-
unfavoriteChat(
ChatId id) → Future< ChatEventsVersionedMixin?> -
Removes the specified Chat from the favorites list of the authenticated
MyUser.
inherited
-
unfavoriteChatContact(
ChatContactId id) → Future< ChatContactEventsVersionedMixin?> -
Removes the specified ChatContact from the favorites list of the
authenticated MyUser.
inherited
-
unregisterPushDevice(
PushDeviceToken token) → Future< void> -
Unregisters a device (Android, iOS, or Web) from receiving notifications
via Firebase Cloud Messaging.
inherited
-
updateChatAvatar(
ChatId id, {MultipartFile? file, CropAreaInput? crop, void onSendProgress(int count, int total)?}) → Future< ChatEventsVersionedMixin?> -
Updates the Chat.avatar field with the provided image, or resets it to
null, by authority of the authenticated MyUser.inherited -
updateUserAvatar(
MultipartFile? file, CropAreaInput? crop, {void onSendProgress(int count, int total)?}) → Future< MyUserEventsVersionedMixin?> -
Updates or resets the MyUser.avatar field with the provided image
file.inherited -
updateUserBio(
UserBio? bio) → Future< MyUserEventsVersionedMixin?> -
Updates or resets the MyUser.bio field of the authenticated MyUser.
inherited
-
updateUserCallCover(
MultipartFile? file, CropAreaInput? crop, {void onSendProgress(int count, int total)?}) → Future< MyUserEventsVersionedMixin?> -
Updates or resets the MyUser.callCover field with the provided image
file.inherited -
updateUserLogin(
UserLogin? login) → Future< MyUserEventsVersionedMixin?> -
Updates MyUser.login field for the authenticated MyUser.
inherited
-
updateUserName(
UserName? name) → Future< MyUserEventsVersionedMixin?> -
Updates MyUser.name field for the authenticated MyUser.
inherited
-
updateUserPassword(
{MyUserIdentifier? identifier, UserPassword? newPassword, MyUserCredentials? confirmation}) → Future< MyUserEventsVersionedMixin?> -
Updates or resets password of the authenticated MyUser or the one
identified by the provided MyUserIdentifier.
inherited
-
updateUserPresence(
Presence presence) → Future< MyUserEventsVersionedMixin?> -
Updates MyUser.presence to the provided value.
inherited
-
updateUserStatus(
UserTextStatus? text) → Future< MyUserEventsVersionedMixin?> -
Updates or resets the MyUser.status field of the authenticated MyUser.
inherited
-
updateWelcomeMessage(
WelcomeMessageInput? content) → Future< MyUserEventsVersionedMixin?> -
Updates the WelcomeMessage of the authenticated MyUser.
inherited
-
uploadAttachment(
MultipartFile? attachment, {void onSendProgress(int count, int total)?, CancelToken? cancelToken}) → Future< UploadAttachment$Mutation$UploadAttachment$UploadAttachmentOk> -
Creates a new Attachment linked to the authenticated MyUser for a
later use in the postChatMessage mutation.
inherited
-
useChatDirectLink(
ChatDirectLinkSlug slug) → Future< UseChatDirectLink$Mutation$UseChatDirectLink$UseChatDirectLinkOk> -
Uses the specified ChatDirectLink by the authenticated MyUser creating
a new Chat-dialog or joining an existing Chat-group.
inherited
-
userEvents(
UserId id, Future< UserVersion?> ver()) → Future<Stream< QueryResult< >Object?> > -
Subscribes to UserEvents of the specified User.
inherited
-
validateConfirmationCode(
{required MyUserIdentifier identifier, required ConfirmationCode code}) → Future< void> -
Validates the provided ConfirmationCode for the MyUser identified by the provided MyUserIdentifier without using it.
inherited
-
validateToken(
Credentials creds) → Future< ValidateToken$Query> -
Validates the authorization token of the provided Credentials.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited