childText method
Text
childText({
- Object? text,
- AFWidgetID? wid,
- dynamic style,
- dynamic textColor,
- dynamic fontSize,
- dynamic fontWeight,
- TextAlign? textAlign,
- TextOverflow? overflow,
- int? maxLines,
- bool? softWrap,
@see translate for all the ways text can be specified.
Implementation
Text childText({
Object? text,
AFWidgetID? wid,
dynamic style,
dynamic textColor,
dynamic fontSize,
dynamic fontWeight,
TextAlign? textAlign,
TextOverflow? overflow,
int? maxLines,
bool? softWrap,
}) {
TextStyle? styleS;
if(style != null) {
styleS = styleText(style);
}
if(textColor != null || fontSize != null || fontWeight != null) {
styleS = TextStyle(
color: color(textColor) ?? styleS?.color,
fontSize: size(fontSize) ?? styleS?.fontSize,
fontWeight: weight(fontWeight) ?? styleS?.fontWeight
);
}
var textT = translate(wid: wid, text: text);
return Text(textT,
key: keyForWID(wid),
style: styleS,
textAlign: textAlign,
textScaleFactor: deviceTextScaleFactor,
overflow: overflow,
maxLines: maxLines,
softWrap: softWrap,
);
}