defaultBuilder method
Default builder for the widget, which is necessary and must been override.
Implementation
@override
Widget defaultBuilder(BuildContext context) {
return _isHidden() ? const SizedBox() : TencentCloudChatThemeWidget(
build: (ctx, colors, fontSize) => SwipeActionCell(
key: ObjectKey(widget.conversation.conversationID),
trailingActions: <SwipeAction>[
SwipeAction(
title: isPin() ? tL10n.unpin : tL10n.pin,
onTap: (CompletionHandler handler) async {
await _pinConversation();
},
color: colors.conversationItemSwipeActionOneBgColor,
icon: Icon(
isPin() ? Icons.vertical_align_bottom_rounded : Icons.vertical_align_top_rounded,
color: colors.conversationItemSwipeActionOneTextColor,
),
style: TextStyle(
fontSize: fontSize.fontsize_12,
color: colors.conversationItemSwipeActionOneTextColor,
),
),
SwipeAction(
title: tL10n.more,
onTap: (CompletionHandler handler) async {
await showMoreItemAction(ctx, fontSize, colors);
},
color: colors.conversationItemSwipeActionTwoBgColor,
icon: Icon(
Icons.expand_circle_down_outlined,
color: colors.conversationItemSwipeActionTwoTextColor,
),
style: TextStyle(
fontSize: fontSize.fontsize_12,
color: colors.conversationItemSwipeActionTwoTextColor,
),
),
],
backgroundColor: Colors.transparent,
child: conversationInner(colors),
),
);
}