defaultBuilder method

  1. @override
Widget defaultBuilder(
  1. BuildContext context
)
override

Default builder for the widget, which is necessary and must been override.

Implementation

@override
Widget defaultBuilder(BuildContext context) {
  return TencentCloudChatThemeWidget(
    build: (context, colorTheme, textStyle) => GestureDetector(
      onTap: widget.item.onTap,
      child: Container(
        padding: EdgeInsets.symmetric(vertical: getHeight(12), horizontal: getWidth(16)),
        decoration: BoxDecoration(
          border: Border(bottom: BorderSide(color: colorTheme.contactItemTabItemBorderColor)),
          color: colorTheme.contactTabItemBackgroundColor,
        ),
        child: Row(
          children: [
            SizedBox(
              width: getSquareSize(24),
              height: getSquareSize(24),
              child: Icon(
                widget.item.icon,
                color: colorTheme.primaryColor,
              ),
            ),
            const SizedBox(
              width: 8,
            ),
            Expanded(
                child: Container(
                    padding: EdgeInsets.only(left: getWidth(4)),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Text(
                          widget.item.name,
                          style: TextStyle(fontSize: textStyle.fontsize_16, fontWeight: FontWeight.w400, color: colorTheme.contactItemTabItemNameColor),
                        ),
                        Expanded(
                          child: Container(),
                        ),
                        getUnreadCount(),
                        Icon(
                          Icons.keyboard_arrow_right,
                          color: colorTheme.contactItemTabItemNameColor,
                        )
                      ],
                    )))
          ],
        ),
      ),
    ),
  );
}