I looked up here and pub.dev and flutter docs but could not find(or could not word my query) any solution for this simple task.
I want to display a String
Screenshot:
Code:
// Create a custom widget like this
class MyVerticalText extends StatelessWidget {
final String text;
const MyVerticalText(this.text);
@override
Widget build(BuildContext context) {
return Wrap(
runSpacing: 30,
direction: Axis.vertical,
alignment: WrapAlignment.center,
children: text.split("").map((string) => Text(string, style: TextStyle(fontSize: 22))).toList(),
);
}
}
And use it like:
MyVerticalText("HELLO WORLD THANKS❤️")