defaultBuilder method
Default builder for the widget, which is necessary and must been override.
Implementation
@override
Widget defaultBuilder(BuildContext context) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: getWidth(13),
),
child: SizedBox(
width: getSquareSize(40),
height: getSquareSize(40),
child: Stack(
children: [
Positioned(
left: 0,
top: 0,
child: TencentCloudChatCommonBuilders.getCommonAvatarBuilder(
scene: TencentCloudChatAvatarScene.contacts,
imageList: [widget.friend.userProfile?.faceUrl],
width: getSquareSize(40),
height: getSquareSize(40),
borderRadius: getSquareSize(34),
),
),
if (TencentCloudChat.instance.dataInstance.basic.userConfig.useUserOnlineStatus ?? true)
Positioned(
bottom: 0,
right: 0,
child: SizedBox(
width: getSquareSize(10),
height: getSquareSize(10),
child: Container(
decoration: BoxDecoration(
color: TencentCloudChat.instance.dataInstance.contact.getOnlineStatusByUserId(userID: widget.friend.userID) ?colorTheme.conversationItemUserStatusBgColor : Colors.transparent,
borderRadius: BorderRadius.all(
Radius.circular(
getSquareSize(5),
),
),
),
),
),
),
]
),
));
}