CallRepository class

Implementation of an AbstractCallRepository.

Inheritance
Implemented types

Constructors

CallRepository(GraphQlProvider _graphQlProvider, UserRepository _userRepo, CallCredentialsDriftProvider _callCredentialsProvider, ChatCredentialsDriftProvider _chatCredentialsProvider, AbstractSettingsRepository _settingsRepo, {required UserId me})

Properties

calls RxObsMap<ChatId, Rx<OngoingCall>>
Map of the current OngoingCalls.
final
ensureRemoteDialog Future<RxChat?> Function(ChatId id)?
Callback, called when the provided Chat should be remotely accessible.
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
me UserId
UserId of the currently authenticated MyUser.
final
media Rx<MediaSettings?>
Returns the current value of MediaSettings.
no setter
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

Methods

$configureLifeCycle() → void
inherited
add(ChatCall call) Future<Rx<OngoingCall>?>
Adds the provided ChatCall to the calls, if not already.
override
addStored(WebStoredCall stored, {bool withAudio = true, bool withVideo = true, bool withScreen = false}) Rx<OngoingCall>
Transforms the provided WebStoredCall into an OngoingCall and adds it, if not already.
override
contains(ChatId chatId) bool
Returns true if an OngoingCall identified by chatId exists in the calls map.
override
decline(ChatId chatId) Future<void>
Declines the current OngoingCall in the specified chatId by the authenticated MyUser.
override
generateCredentials(ChatId chatId) Future<ChatCallCredentials>
Generates the ChatCallCredentials for a Chat identified by the provided chatId.
override
getCredentials(ChatItemId callId) Future<ChatCallCredentials>
Returns the ChatCallCredentials for an OngoingCall identified by the provided callId.
override
heartbeat(ChatItemId id, ChatCallDeviceId deviceId) Stream<ChatCallEvents>
Subscribes to ChatCallEvents of an OngoingCall.
override
join(ChatId chatId, ChatCall? call, {bool withAudio = true, bool withVideo = false, bool withScreen = false}) Future<Rx<OngoingCall>?>
Joins the current OngoingCall in the specified chatId by the authenticated MyUser.
override
leave(ChatId chatId, ChatCallDeviceId deviceId) Future<void>
Leaves the current OngoingCall in the specified chatId by the authenticated MyUser.
override
move(ChatId chatId, ChatId newChatId) → void
Switches the OngoingCall identified by its chatId to the specified newChatId.
override
moveCredentials(ChatItemId callId, ChatItemId newCallId, ChatId chatId, ChatId newChatId) Future<void>
Moves the ChatCallCredentials from the callId to the newCallId.
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.
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
redialChatCallMember(ChatId chatId, UserId memberId) Future<void>
Redials a User who left or declined the ongoing ChatCall in the specified Chat-group by the authenticated MyUser.
override
remove(ChatId chatId) Rx<OngoingCall>?
Ends an OngoingCall happening in the Chat identified by the provided chatId.
override
removeChatCallMember(ChatId chatId, UserId userId) Future<void>
Removes the specified User from the ChatCall of the specified Chat-group by authority of the authenticated MyUser.
override
removeCredentials(ChatId chatId, ChatItemId callId) Future<void>
Removes the ChatCallCredentials of an OngoingCall identified by the provided chatId and callId.
override
start(ChatId chatId, {bool withAudio = true, bool withVideo = true, bool withScreen = false}) Future<Rx<OngoingCall>>
Starts a new OngoingCall in the specified chatId by the authenticated MyUser.
override
toggleHand(ChatId chatId, bool raised) Future<void>
Raises/lowers a hand of the authenticated MyUser in the specified ChatCall.
override
toString() String
A string representation of this object.
inherited
transferCredentials(ChatId chatId, ChatItemId callId) Future<void>
Copies the ChatCallCredentials from the provided Chat and links them to the specified OngoingCall.
override
transformDialogCallIntoGroupCall(ChatId chatId, List<UserId> additionalMemberIds, ChatName? groupName) Future<void>
Moves an ongoing ChatCall in a Chat-dialog to a newly created Chat-group, optionally adding new members.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](ChatId chatId) Rx<OngoingCall>?
Returns reactive OngoingCall if there's any identified by chatId.
override
operator []=(ChatId chatId, Rx<OngoingCall> call) → void
Replaces the value of OngoingCall identified by chatId to call.
override