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