1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 21:09:21 +00:00

Add hang up button

This commit is contained in:
Pierre HUBERT 2020-04-20 15:20:01 +02:00
parent c0856c5126
commit 73c7fa8807

View File

@ -131,13 +131,13 @@ class _CallScreenState extends SafeState<CallScreen> {
void _memberReady(int memberID) {
_membersList.getUser(memberID).status = MemberStatus.READY;
setState((){});
setState(() {});
}
/// Call this when a user has interrupted streaming
void _removeRemotePeerConnection(int memberID) {
_membersList.getUser(memberID).status = MemberStatus.JOINED;
setState((){});
setState(() {});
}
/// Call this when a members has completely left the call
@ -178,7 +178,7 @@ class _CallScreenState extends SafeState<CallScreen> {
if (_membersList == null) return buildCenteredProgressBar();
return Column(
children: <Widget>[_buildMembersArea()],
children: <Widget>[_buildMembersArea(), Spacer(), _buildFooterArea()],
);
}
@ -200,4 +200,21 @@ class _CallScreenState extends SafeState<CallScreen> {
),
);
}
/// Footer area
Widget _buildFooterArea() {
return Material(
color: Colors.black,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// Hang up call
IconButton(
icon: Icon(Icons.phone, color: Colors.red),
onPressed: () => _leaveCall(),
),
],
),
);
}
}