CallService class
Service controlling incoming and outgoing OngoingCalls.
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- DisposableService
- CallService
Constructors
- CallService(AuthService _authService, ChatService _chatService, AbstractCallRepository _callsRepo)
Properties
-
calls
→ RxObsMap<
ChatId, Rx< OngoingCall> > -
Unmodifiable map of the currently displayed OngoingCalls.
no setter
- 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
-
Returns ID of the authenticated MyUser.
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
-
addStored(
WebStoredCall stored, {bool withAudio = true, bool withVideo = true, bool withScreen = false}) → Rx< OngoingCall> -
Constructs an OngoingCall from the provided
stored
call. -
call(
ChatId chatId, {bool withAudio = true, bool withVideo = false, bool withScreen = false}) → Future< void> -
Starts an OngoingCall in a Chat with the given
chatId
. -
decline(
ChatId chatId) → Future< void> -
Declines an OngoingCall identified by the given
chatId
. -
getChat(
ChatId id) → FutureOr< RxChat?> -
Returns a RxChat by the provided
id
. -
heartbeat(
ChatItemId id, ChatCallDeviceId deviceId) → Stream< ChatCallEvents> - Returns heartbeat subscription used to keep MyUser in an OngoingCall.
-
join(
ChatId chatId, {bool withAudio = true, bool withVideo = false, bool withScreen = false}) → Future< void> -
Joins an OngoingCall identified by the given
chatId
. -
leave(
ChatId chatId, [ChatCallDeviceId? deviceId]) → Future< void> -
Leaves or declines an OngoingCall identified by the given
chatId
. -
moveCall(
{required ChatId chatId, required ChatId newChatId, required ChatItemId callId, required ChatItemId newCallId}) → void -
Switches an OngoingCall identified by its
chatId
to the specifiednewChatId
. -
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
-
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.
-
remove(
ChatId chatId) → void -
Removes an OngoingCall identified by the given
chatId
. -
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.
-
removeCredentials(
ChatId chatId, ChatItemId callId) → Future< void> -
Removes the ChatCallCredentials of an OngoingCall identified by the
provided
id
. -
toggleHand(
ChatId chatId, bool raised) → Future< void> -
Raises/lowers a hand of the authenticated MyUser in the OngoingCall
identified by the given
chatId
. -
toString(
) → String -
A string representation of this object.
inherited
-
transferCredentials(
ChatId chatId, ChatItemId callId) → void - Copies the ChatCallCredentials from the provided Chat and links them to the specified OngoingCall.
-
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.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited