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

Improve buttons appearance

This commit is contained in:
Pierre HUBERT 2020-04-23 13:39:33 +02:00
parent d94b535001
commit 0ebccf1075

View File

@ -562,7 +562,8 @@ class _CallScreenState extends SafeState<CallScreen> {
// Hang up call
_FooterButton(
width: 60,
icon: Icon(Icons.phone, color: Colors.red),
icon: Icon(Icons.phone),
bgColor: Colors.red.shade900,
onPressed: () => _leaveCall(),
),
@ -604,14 +605,16 @@ class _FooterButton extends StatelessWidget {
final Widget icon;
final bool visible;
final double width;
final Color bgColor;
const _FooterButton({
Key key,
const _FooterButton(
{Key key,
@required this.icon,
@required this.onPressed,
this.visible = true,
this.width = 35,
}) : assert(icon != null),
this.width = 45,
this.bgColor = Colors.black})
: assert(icon != null),
assert(visible != null),
super(key: key);
@ -619,14 +622,14 @@ class _FooterButton extends StatelessWidget {
Widget build(BuildContext context) {
if (!visible) return Container();
return Padding(
padding: const EdgeInsets.only(left: 8, right: 8),
padding: const EdgeInsets.only(left: 6, right: 6),
child: Container(
width: width,
child: FloatingActionButton(
child: icon,
foregroundColor: Colors.white,
onPressed: onPressed == null ? null : () => onPressed(),
backgroundColor: Colors.black,
backgroundColor: bgColor,
),
),
);