circleIconButton method

  1. @override
Widget circleIconButton({
  1. required Widget icon,
  2. required VoidCallback? onTap,
  3. String? tooltip,
  4. double size = 54,
})
override

Circular icon button used for the resend channels (SMS / WhatsApp / Call).

Implementation

@override
Widget circleIconButton({
  required Widget icon,
  required VoidCallback? onTap,
  String? tooltip,
  double size = 54,
}) {
  final child = InkWell(
    onTap: onTap,
    customBorder: const CircleBorder(),
    child: Container(
      width: size,
      height: size,
      decoration: BoxDecoration(
        shape: BoxShape.circle,
        color: theme.socialButtonColor,
        boxShadow: _clayShadow(_pastel, blur: 14),
      ),
      foregroundDecoration: _innerGlow(shape: BoxShape.circle),
      alignment: Alignment.center,
      child: IconTheme(
        data: IconThemeData(color: theme.primary, size: size * 0.46),
        child: icon,
      ),
    ),
  );
  return tooltip == null ? child : Tooltip(message: tooltip, child: child);
}