Skip to content

Commit 10ca2f1

Browse files
Brazolkanat
andauthored
removed code hiding call controls in landscape (#503)
Co-authored-by: Kanat Kiialbaev <[email protected]>
1 parent 6dea651 commit 10ca2f1

File tree

2 files changed

+17
-27
lines changed

2 files changed

+17
-27
lines changed

packages/stream_video_flutter/lib/src/call_controls/call_controls.dart

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,13 @@ class StreamCallControls extends StatelessWidget {
6363

6464
@override
6565
Widget build(BuildContext context) {
66-
if (isMobileLandscape(context)) {
67-
return LandscapeCallControls(
68-
options: options,
69-
spacing: spacing,
70-
);
71-
} else {
72-
return PortraitCallControls(
73-
options: options,
74-
elevation: elevation,
75-
spacing: spacing,
76-
padding: padding,
77-
borderRadius: borderRadius,
78-
);
79-
}
66+
return PortraitCallControls(
67+
options: options,
68+
elevation: elevation,
69+
spacing: spacing,
70+
padding: padding,
71+
borderRadius: borderRadius,
72+
);
8073
}
8174
}
8275

packages/stream_video_flutter/lib/src/call_screen/call_content/call_content.dart

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,17 @@ class _StreamCallContentState extends State<StreamCallContent> {
112112
}
113113

114114
final localParticipant = callState.localParticipant;
115-
final isDesktopOrPortrait = !isMobileLandscape(context);
116115

117116
return Scaffold(
118117
backgroundColor: const Color(0XFF272A30),
119-
appBar: isDesktopOrPortrait
120-
? widget.callAppBarBuilder?.call(context, call, callState) ??
121-
CallAppBar(
122-
call: call,
123-
onBackPressed: widget.onBackPressed,
124-
onLayoutModeChanged: (mode) {
125-
setState(() => _currentLayoutMode = mode);
126-
},
127-
)
128-
: null,
118+
appBar: widget.callAppBarBuilder?.call(context, call, callState) ??
119+
CallAppBar(
120+
call: call,
121+
onBackPressed: widget.onBackPressed,
122+
onLayoutModeChanged: (mode) {
123+
setState(() => _currentLayoutMode = mode);
124+
},
125+
),
129126
body: Stack(
130127
children: [
131128
GestureDetector(
@@ -141,7 +138,7 @@ class _StreamCallContentState extends State<StreamCallContent> {
141138
),
142139
],
143140
),
144-
bottomNavigationBar: isDesktopOrPortrait && localParticipant != null
141+
bottomNavigationBar: localParticipant != null
145142
? widget.callControlsBuilder?.call(context, call, callState) ??
146143
StreamCallControls.withDefaultOptions(
147144
call: call,
@@ -153,7 +150,7 @@ class _StreamCallContentState extends State<StreamCallContent> {
153150
}
154151

155152
void _toggleStatsVisibility() {
156-
if(kDebugMode){
153+
if (kDebugMode) {
157154
setState(() {
158155
_isStatsVisible = !_isStatsVisible;
159156
});

0 commit comments

Comments
 (0)