build method

  1. @override
Widget build(
  1. BuildContext context
)
override

UI

Implementation

@override
Widget build(BuildContext context) {
  return Container(
    height: height,
    width: width,
    // height: 35.0,
    // width: 35.0,
    margin: const EdgeInsets.only(right: 5.0),
    child: Tooltip(
      message: tooltip,
      child: Material(
        color: backgroundColor ?? Theme.of(context).primaryColor,
        shape: RoundedRectangleBorder(
          borderRadius: RadiusUtils.borderRadiusForButtons,
          side: const BorderSide(color: Colors.grey, width: 0.5),
        ),
        child: InkWell(
          borderRadius: RadiusUtils.borderRadiusForButtons,
          onTap: onPressed,
          child: Center(
            child: Icon(
              icon,
              size: iconSize,
              color: iconColor ?? Theme.of(context).primaryColorDark,
            ),
          ),
        ),
      ),
    ),
  );
}