buildBtn method
Widget
buildBtn({
- Key? key,
- required Widget child,
- EdgeInsetsGeometry? margin,
- BoxDecoration? boxDecoration,
- Color? bgColor,
- GestureTapCallback? onTap,
Implementation
Widget buildBtn(
{Key? key,
required Widget child,
EdgeInsetsGeometry? margin,
BoxDecoration? boxDecoration,
Color? bgColor,
GestureTapCallback? onTap}) {
return Material(
key: key,
color: Colors.transparent,
child: Container(
margin: margin ?? const EdgeInsets.only(),
child: Ink(
decoration: boxDecoration ??
BoxDecoration(borderRadius: BorderRadius.circular(0.h), color: bgColor ?? Colors.white),
child: InkWell(
onTap: this
? () {
onTap?.call();
}
: null,
borderRadius: (boxDecoration?.borderRadius ?? BorderRadius.circular(0.h)) as BorderRadius,
child: child,
)),
),
);
}