File tree Expand file tree Collapse file tree 6 files changed +11
-5
lines changed
stream_video_flutter/lib/src
stream_video/lib/src/webrtc Expand file tree Collapse file tree 6 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -378,6 +378,7 @@ class StreamPeerConnection extends Disposable {
378378
379379 @override
380380 Future <void > dispose () async {
381+ _logger.d (() => '[dispose] no args' );
381382 _dropRtcCallbacks ();
382383 _stopObservingStats ();
383384 onStreamAdded = null ;
Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ class RtcManager extends Disposable {
226226
227227 @override
228228 Future <void > dispose () async {
229+ _logger.d (() => '[dispose] no args' );
229230 for (final trackSid in [...publishedTracks.keys]) {
230231 await unpublishTrack (trackId: trackSid);
231232 }
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ class StreamCallControls extends StatelessWidget {
2222 factory StreamCallControls .withDefaultOptions ({
2323 required Call call,
2424 required CallParticipantState localParticipant,
25- VoidCallback ? onLeaveCallTap,
2625 Color ? backgroundColor,
2726 double ? elevation,
2827 double ? spacing,
@@ -33,7 +32,6 @@ class StreamCallControls extends StatelessWidget {
3332 options: defaultCallControlOptions (
3433 call: call,
3534 localParticipant: localParticipant,
36- onLeaveCallTap: onLeaveCallTap,
3735 ),
3836 backgroundColor: backgroundColor,
3937 elevation: elevation,
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import '../../../stream_video_flutter.dart';
66List <Widget > defaultCallControlOptions ({
77 required Call call,
88 required CallParticipantState localParticipant,
9- VoidCallback ? onLeaveCallTap,
109}) {
1110 return [
1211 ToggleSpeakerphoneOption (call: call),
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ class CallAppBar extends StatelessWidget implements PreferredSizeWidget {
1313 this .elevation = 1 ,
1414 this .backgroundColor,
1515 this .onBackPressed,
16+ this .onLeaveCallTap,
1617 this .leading,
1718 this .leadingWidth,
1819 this .title,
@@ -37,6 +38,9 @@ class CallAppBar extends StatelessWidget implements PreferredSizeWidget {
3738 /// The action to perform when the back button is pressed.
3839 final VoidCallback ? onBackPressed;
3940
41+ /// The action to perform when the leave call button is tapped.
42+ final VoidCallback ? onLeaveCallTap;
43+
4044 /// The leading widget to display.
4145 final Widget ? leading;
4246
@@ -84,7 +88,10 @@ class CallAppBar extends StatelessWidget implements PreferredSizeWidget {
8488 if (showLeaveCallAction)
8589 Transform .scale (
8690 scale: 0.8 ,
87- child: LeaveCallOption (call: call),
91+ child: LeaveCallOption (
92+ call: call,
93+ onLeaveCallTap: onLeaveCallTap,
94+ ),
8895 ),
8996 ],
9097 title: title ??
Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ class _StreamCallContentState extends State<StreamCallContent>
216216 CallAppBar (
217217 call: call,
218218 onBackPressed: widget.onBackPressed,
219+ onLeaveCallTap: widget.onLeaveCallTap,
219220 ),
220221 body: Stack (
221222 children: [
@@ -250,7 +251,6 @@ class _StreamCallContentState extends State<StreamCallContent>
250251 StreamCallControls .withDefaultOptions (
251252 call: call,
252253 localParticipant: localParticipant,
253- onLeaveCallTap: widget.onLeaveCallTap,
254254 )
255255 : null ,
256256 );
You can’t perform that action at this time.
0 commit comments