build method
Looks the theme's style up as it builds, so the text follows the theme it's shown in, including a change of theme while its page is open.
Implementation
@override
Widget build(BuildContext context) {
final TextStyle? Function(TextTheme theme)? select = _select;
if (select == null) return super.build(context);
return Text(
data!,
style: select(Theme.of(context).textTheme),
textAlign: textAlign,
textDirection: textDirection,
locale: locale,
softWrap: softWrap,
overflow: overflow,
maxLines: maxLines,
semanticsLabel: semanticsLabel,
).build(context);
}