circleIconButton method

  1. @override
Widget circleIconButton({
  1. required Widget icon,
  2. required VoidCallback? onTap,
  3. String? tooltip,
  4. double size = 50,
})
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 = 50,
}) {
  final child = InkWell(
    onTap: onTap,
    customBorder: const CircleBorder(),
    child: Container(
      width: size,
      height: size,
      decoration: BoxDecoration(
        shape: BoxShape.circle,
        gradient: RadialGradient(
          center: const Alignment(-0.3, -0.4),
          radius: 0.9,
          colors: [
            _lighten(theme.surface, 0.06),
            _darken(theme.surface, 0.12),
          ],
        ),
        border: Border.all(color: Colors.black.withValues(alpha: 0.2)),
        boxShadow: [
          BoxShadow(
            color: Colors.black.withValues(alpha: 0.3),
            blurRadius: 5,
            offset: const Offset(0, 3),
          ),
          BoxShadow(
            color: Colors.white.withValues(alpha: 0.8),
            offset: const Offset(0, 1),
          ),
        ],
      ),
      alignment: Alignment.center,
      child: IconTheme(
        data: IconThemeData(color: theme.primary, size: size * 0.48),
        child: icon,
      ),
    ),
  );
  return tooltip == null ? child : Tooltip(message: tooltip, child: child);
}