handlePopupSelection method

void handlePopupSelection(
  1. String value,
  2. dynamic message
)

Implementation

void handlePopupSelection(String value, dynamic message) {
  switch (value) {
    case 'markAsRead':
      widget.fynoInApp.markAsRead(message).then((_) {
        if (mounted) {
          setState(() {});
        }
        widget.onClick();
      });
      break;
    case 'delete':
      widget.fynoInApp.deleteMessage(message).then((_) {
        if (mounted) {
          setState(() {});
        }
        widget.onClick();
      });
      break;
  }
}