onActionTap method

dynamic onActionTap(
  1. BuildContext context,
  2. Actions type
)

Implementation

onActionTap(BuildContext context, messageSendArea.Actions type) {
  switch (type) {
    case messageSendArea.Actions.gifts:
      showMaterialModalBottomSheet(
          context: context,
          expand: false,
          backgroundColor: Colors.black.withOpacity(0.8),
          barrierColor: Colors.white.withOpacity(0),
          shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(20.w),
                  topRight: Radius.circular(20.w))),
          builder: (c) {
            if (customWidgets?.giftsPanelBuilder != null) {
              return customWidgets!.giftsPanelBuilder!(c);
            }
            return GiftPanel(onTap: (item) => sendGiftMessage(item, c));
          });
      break;
    case messageSendArea.Actions.thumbsUp:
      sendThumbsupMessage(context);
      break;
    default:
  }
}