buildTextSpans static method
List<TextSpan>
buildTextSpans({
- TextStyle? style,
- required List<
String> texts, - required List<
TextStyle?> styles, - required List<
GestureRecognizer?> recognizers, - required List<
String?> semanticsLabels, - required List<
MouseCursor?> mouseCursors, - required List<
PointerEnterEventListener?> onEnters, - required List<
PointerExitEventListener?> onExits, - required List<
Locale?> locales, - required List<
bool?> spellOuts,
Implementation
static List<TextSpan> buildTextSpans({
TextStyle? style,
required List<String> texts,
required List<TextStyle?> styles,
required List<GestureRecognizer?> recognizers,
required List<String?> semanticsLabels,
required List<MouseCursor?> mouseCursors,
required List<PointerEnterEventListener?> onEnters,
required List<PointerExitEventListener?> onExits,
required List<Locale?> locales,
required List<bool?> spellOuts,
}) =>
texts.builderEntry((MapEntry<int, String> entry) => TextSpan(
text: entry.value,
semanticsLabel: semanticsLabels.isEmpty ||
(semanticsLabels.length - 1) < entry.key
? null
: semanticsLabels[entry.key],
mouseCursor:
mouseCursors.isEmpty || (mouseCursors.length - 1) < entry.key
? null
: mouseCursors[entry.key],
onEnter: onEnters.isEmpty || (onEnters.length - 1) < entry.key
? null
: onEnters[entry.key],
onExit: onExits.isEmpty || (onExits.length - 1) < entry.key
? null
: onExits[entry.key],
spellOut: spellOuts.isEmpty || (spellOuts.length - 1) < entry.key
? null
: spellOuts[entry.key],
locale: locales.isEmpty || (locales.length - 1) < entry.key
? null
: locales[entry.key],
recognizer:
recognizers.isEmpty || (recognizers.length - 1) < entry.key
? null
: recognizers[entry.key],
style: styles.isEmpty || (styles.length - 1) < entry.key
? style
: style == null
? styles[entry.key]
: style.merge(styles[entry.key])));