text property
Text
get
text
Implementation
Text get text {
// if (items == null && value != null && value is! String) {
// items = value;
// value = null;
// }
String text;
if (value == null) {
text = '';
} else if (value is bool) {
text = value ? 'true' : 'false';
} else if (value is String) {
text = value.trim();
} else {
text = value.toString().trim();
}
return Text(
text,
key: Key('Text$_key'),
style: style,
textAlign: textAlign,
textDirection: textDirection,
locale: locale,
softWrap: softWrap,
overflow: overflow,
textScaleFactor: textScaleFactor,
maxLines: maxLines,
semanticsLabel: semanticsLabel,
textWidthBasis: textWidthBasis,
textHeightBehavior: textHeightBehavior,
);
}