effectiveSendButtonBuilder method

Widget effectiveSendButtonBuilder(
  1. bool isVoice,
  2. VoidCallback onSend
)

Helper method to build an effective send button based on configuration

Implementation

Widget effectiveSendButtonBuilder(bool isVoice, VoidCallback onSend) {
  // If a custom builder is provided, use it
  if (sendButtonBuilder != null) {
    return sendButtonBuilder!(onSend);
  }

  // Build the default send button with better alignment
  return IconButton(
    icon: Icon(
      sendButtonIcon,
      size: sendButtonIconSize,
      color: isVoice ? sendButtonDisableColor : sendButtonColor,
    ),
    splashColor: Colors.transparent,
    // 去除水波纹
    highlightColor: Colors.transparent,
    // 去除高亮
    padding: sendButtonPadding,
    onPressed: onSend,
  );
}