valueRichTextInfo static method
InfoModal
valueRichTextInfo(
- String keyTitle,
- String valueTitle, {
- double? fontSize,
- required double itemSpacing,
- TextStyle? valueTextStyle,
- bool isArrow = false,
- HyperLinkCallback? richTextLinkClick,
- VoidCallback? valueClickCallback,
- PairInfoTableConfig? themeData,
value是富文本
Implementation
static InfoModal valueRichTextInfo(
String keyTitle,
String valueTitle, {
double? fontSize,
required double itemSpacing,
TextStyle? valueTextStyle,
bool isArrow = false,
HyperLinkCallback? richTextLinkClick,
VoidCallback? valueClickCallback,
PairInfoTableConfig? themeData,
}) {
themeData ??= PairInfoTableConfig();
themeData = BaseThemeConfig.instance
.getConfig(configId: themeData.configId)
.pairInfoTableConfig
.merge(themeData);
themeData = themeData.merge(PairInfoTableConfig(
itemSpacing: itemSpacing,
keyTextStyle: BaseTextStyle(fontSize: fontSize),
valueTextStyle: BaseTextStyle(fontSize: fontSize)
.merge(BaseTextStyle.withStyle(valueTextStyle))));
return InfoModal(
keyPart: keyTitle,
valuePart: Padding(
padding: EdgeInsets.only(left: itemSpacing),
child: ExcludeSemantics(
child: BrnCSS2Text.toTextView(valueTitle,
maxLines: isArrow ? 1 : null,
textOverflow:
isArrow ? TextOverflow.ellipsis : TextOverflow.clip,
defaultStyle: themeData.valueTextStyle.generateTextStyle(),
linksCallback: (text, url) {
if (richTextLinkClick != null) {
richTextLinkClick(text, url);
}
}),
),
),
valueClickCallback: valueClickCallback,
isArrow: isArrow);
}