chore: format code
This commit is contained in:
parent
e64a0fc4fd
commit
97f8d95f2d
|
@ -132,7 +132,7 @@ class LinkifyText extends StatelessWidget {
|
||||||
|
|
||||||
final Map<LinkType, TextStyle>? customLinkStyles;
|
final Map<LinkType, TextStyle>? customLinkStyles;
|
||||||
|
|
||||||
final Map<String,String>? linkifyListCallBack;
|
final Map<String, String>? linkifyListCallBack;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -378,7 +378,7 @@ TextSpan _linkify({
|
||||||
List<LinkType>? linkTypes,
|
List<LinkType>? linkTypes,
|
||||||
Map<LinkType, TextStyle>? customLinkStyles,
|
Map<LinkType, TextStyle>? customLinkStyles,
|
||||||
Function(Link)? onTap,
|
Function(Link)? onTap,
|
||||||
Map<String,String>? mapReplace,
|
Map<String, String>? mapReplace,
|
||||||
}) {
|
}) {
|
||||||
final _regExp = constructRegExpFromLinkType(linkTypes ?? [LinkType.url]);
|
final _regExp = constructRegExpFromLinkType(linkTypes ?? [LinkType.url]);
|
||||||
|
|
||||||
|
@ -399,7 +399,9 @@ TextSpan _linkify({
|
||||||
// add the link
|
// add the link
|
||||||
spans.add(
|
spans.add(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:( mapReplace?[link.value??'']?.isNotEmpty??false) ? (mapReplace?[link.value??''] ??'' ): link.value,
|
text: (mapReplace?[link.value ?? '']?.isNotEmpty ?? false)
|
||||||
|
? (mapReplace?[link.value ?? ''] ?? '')
|
||||||
|
: link.value,
|
||||||
style: customLinkStyles?[link.type] ?? linkStyle,
|
style: customLinkStyles?[link.type] ?? linkStyle,
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () {
|
..onTap = () {
|
||||||
|
@ -407,10 +409,8 @@ TextSpan _linkify({
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return TextSpan(children: spans);
|
return TextSpan(children: spans);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue