init method
Implementation
@override
Widget init(BuildContext context) {
TextStyle? textStyle = this.textStyle;
Style? style = this.style;
if (style != null) {
if (textStyle == null) {
// if (style is TextStyle) {
// textStyle = style? as TextStyle;
// } else {
textStyle = textStyle ?? style.textStyle;
// }
}
} else {
if (tag != null) {
style = commonController.getStyle(Get.currentRoute, tag);
}
style ??= commonController.getStyle(Get.currentRoute, runtimeType);
textStyle = textStyle ?? style?.textStyle;
}
Widget widget = XtyleText(
text,
style: textStyle,
overflow: overflow,
maxLines: maxLines,
softWrap: softWrap,
textAlign: textAlign,
);
return widget;
}