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) => Center(
            child: ListView(
              children: [
                SizedBox(
                  height: getHeight(40),
                ),
                Row(
                  mainAxisSize: MainAxisSize.min,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    TencentCloudChatCommonBuilders.getCommonAvatarBuilder(
                      scene: TencentCloudChatAvatarScene.groupProfile,
                      imageList: [TencentCloudChatUtils.checkString(widget.memberFullInfo.faceUrl)],
                      width: getSquareSize(94),
                      height: getSquareSize(94),
                      borderRadius: getSquareSize(48),
                    )
                  ],
                ),
                Container(
                  padding: EdgeInsets.all(getSquareSize(16)),
                  child: Column(
                    children: [
                      Text(
                        _getShowName(),
                        textAlign: TextAlign.center,
                        style: TextStyle(fontSize: textStyle.fontsize_24, fontWeight: FontWeight.w600),
                      ),
                      Text(
                        "ID: ${widget.memberFullInfo.userID}",
                        style: TextStyle(fontSize: textStyle.fontsize_12),
                      )
                    ],
                  ),
                ),
                Column(
                  children: [
                    Container(
                      padding: EdgeInsets.symmetric(horizontal: getWidth(16), vertical: getHeight(12)),
                      width: MediaQuery.of(context).size.width,
                      color: colorTheme.groupProfileTabBackground,
                      child: Row(
                        children: [
                          Expanded(
                            child: Text(tL10n.myAliasInGroup, style: TextStyle(color: colorTheme.groupProfileTabTextColor, fontSize: textStyle.fontsize_16)),
                          ),
                          Text(_getGroupRole(), style: TextStyle(color: colorTheme.groupProfileTextColor, fontSize: textStyle.fontsize_16))
                        ],
                      ),
                    )
                  ],
                ),
                Column(
                  children: [
                    Container(
                      padding: EdgeInsets.symmetric(horizontal: getWidth(16), vertical: getHeight(12)),
                      width: MediaQuery.of(context).size.width,
                      color: colorTheme.groupProfileTabBackground,
                      child: Row(
                        children: [
                          Expanded(
                            child: Text("Joined time", style: TextStyle(color: colorTheme.groupProfileTabTextColor, fontSize: textStyle.fontsize_16)),
                          ),
                          Text(DateTime.fromMicrosecondsSinceEpoch(widget.memberFullInfo.joinTime ?? 0).toString(), style: TextStyle(color: colorTheme.groupProfileTextColor, fontSize: textStyle.fontsize_16))
                        ],
                      ),
                    )
                  ],
                )
              ],
            ),
          ));
}