1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 22:39:22 +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 { class CallScreen extends StatefulWidget {
final int convID; final int convID;
/// This settings should be always true except for the small call window...
final bool floatingButtons; final bool floatingButtons;
const CallScreen({ const CallScreen({
@ -483,11 +485,16 @@ class _CallScreenState extends SafeState<CallScreen> {
return Column( return Column(
children: <Widget>[ children: <Widget>[
// Members list
_canHideMenuBar ? Container() : _buildMembersArea(), _canHideMenuBar ? Container() : _buildMembersArea(),
// Build videos area (+ buttons if floating)
Expanded(child: LayoutBuilder(builder: _buildVideosArea)), Expanded(child: LayoutBuilder(builder: _buildVideosArea)),
_canHideMenuBar || widget.floatingButtons
? Container() // Buttons bar (if buttons are not floating)
: _buildFooterArea() !_canHideMenuBar && !widget.floatingButtons
? _buildFooterArea()
: Container(),
], ],
); );
} }
@ -554,11 +561,11 @@ class _CallScreenState extends SafeState<CallScreen> {
? _buildLocalVideo() ? _buildLocalVideo()
: Container(), : Container(),
// Buttons bar // Buttons bar (if floating)
_canHideMenuBar || !widget.floatingButtons !_canHideMenuBar && widget.floatingButtons
? Container() ? Positioned(
: Positioned(
bottom: 10, right: 0, left: 0, child: _buildFooterArea()) bottom: 10, right: 0, left: 0, child: _buildFooterArea())
: Container(),
], ],
); );
} }