timBuild method

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

Implementation

@override
Widget timBuild(BuildContext context) {
  return MarkdownBody(
    data: mdTextCompiler(messageText,
        isUseTencentCloudChatPackage: isUseTencentCloudChatPackage,
        customEmojiStickerList: customEmojiStickerList),
    selectable: isEnableTextSelection ?? false,
    styleSheet: MarkdownStyleSheet.fromTheme(ThemeData(
            textTheme: TextTheme(
                bodyMedium: style ?? const TextStyle(fontSize: 16.0))))
        .copyWith(
      a: TextStyle(color: LinkUtils.hexToColor("015fff")),
    ),
    extensionSet: md.ExtensionSet.gitHubWeb,
    onTapLink: (
      String link,
      String? href,
      String title,
    ) {
      if (onLinkTap != null) {
        onLinkTap!(href ?? "");
      } else {
        LinkUtils.launchURL(context, href ?? "");
      }
    },
  );
}