mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Improve buttons appearance
This commit is contained in:
		@@ -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,
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user