1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-10-23 06:53:23 +00:00

Improve code

This commit is contained in:
Pierre HUBERT 2020-05-10 14:36:33 +02:00
parent 1d7e846973
commit cf9f93dcb3

View File

@ -28,6 +28,8 @@ enum _PopupMenuOption { STOP_STREAMING, SWITCH_CAMERA }
class CallScreen extends StatefulWidget {
final int convID;
/// This settings should be always true except for the small call window...
final bool floatingButtons;
const CallScreen({
@ -483,11 +485,16 @@ class _CallScreenState extends SafeState<CallScreen> {
return Column(
children: <Widget>[
// Members list
_canHideMenuBar ? Container() : _buildMembersArea(),
// Build videos area (+ buttons if floating)
Expanded(child: LayoutBuilder(builder: _buildVideosArea)),
_canHideMenuBar || widget.floatingButtons
? Container()
: _buildFooterArea()
// Buttons bar (if buttons are not floating)
!_canHideMenuBar && !widget.floatingButtons
? _buildFooterArea()
: Container(),
],
);
}
@ -554,11 +561,11 @@ class _CallScreenState extends SafeState<CallScreen> {
? _buildLocalVideo()
: Container(),
// Buttons bar
_canHideMenuBar || !widget.floatingButtons
? Container()
: Positioned(
// Buttons bar (if floating)
!_canHideMenuBar && widget.floatingButtons
? Positioned(
bottom: 10, right: 0, left: 0, child: _buildFooterArea())
: Container(),
],
);
}