getBothEndsChild method
Implementation
Widget getBothEndsChild() {
if (widget.scrollAxis == Axis.vertical) {
final String newString = widget.text.split("").join("\n");
return Center(
child: Text(
newString,
style: widget.textStyle,
textAlign: TextAlign.center,
),
);
}
return Center(
child: Text(
widget.text,
style: widget.textStyle,
),
);
}