getCustomIcon function

Widget getCustomIcon({
  1. double? width,
  2. double? height,
  3. required Widget icon,
  4. required Key buttonKey,
  5. Function? onButton,
})

Implementation

Widget getCustomIcon({
  double? width,
  double? height,
  required Widget icon,
  required Key buttonKey,
  Function? onButton,
}) {
  return SizedBox(
    height: height ?? _buttonIconSize,
    width: width ?? _buttonIconSize,
    child: IconButton(
      key: buttonKey,
      padding: const EdgeInsets.all(0),
      icon: icon,
      onPressed: onButton != null ? () => onButton() : null,
    ),
  );
}