import 'package:flutter/material.dart'; class CustomLoginButton extends StatelessWidget { final Widget child; final double width; final double height; final Function? onPressed; final String? icon; final Color? color; const CustomLoginButton({ Key? key, required this.child, this.width = double.infinity, this.height = 50.0, this.onPressed, this.icon, this.color, }) : super(key: key); @override Widget build(BuildContext context) { return ClipRRect( borderRadius: BorderRadius.only( topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0), bottomLeft: Radius.circular(30), bottomRight: Radius.circular(30), ), child: Container( width: width, height: 40.0, decoration: BoxDecoration( color: color, borderRadius: BorderRadius.only( topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0), bottomLeft: Radius.circular(30), bottomRight: Radius.circular(30), ), boxShadow: [ BoxShadow( color: Colors.grey, offset: Offset(0.0, 1.5), blurRadius: 1.5, ), ], ), child: Material( shape: RoundedRectangleBorder( borderRadius: BorderRadius.all( Radius.circular(25.0), ), ), color: Colors.transparent, child: Container( decoration: BoxDecoration( borderRadius: BorderRadius.only( topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0), bottomLeft: Radius.circular(30), bottomRight: Radius.circular(30), ), border: Border.all( color: Colors.grey, width: 0.5, ), ), child: InkWell( onTap: onPressed as void Function()?, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Image( image: AssetImage(icon!), height: 20, ), child ], )), ), ), ), ); } }