Reputation: 19385
I am trying to run the simplest possible flutter app by printing Hello World in the screen.
Following this issue, I tried both of the snippets :
void main() {
runApp(
new Center(
child: new Text("Hello World!", textDirection: TextDirection.ltr)
)
);
}
&&
void main() {
runApp(new Center(
child: new Directionality(
textDirection: TextDirection.ltr,
child: new Text('Hello, world!'))));
}
But I get error which says :
No Directionality widget found. RichText widgets require a Directionality widget ancestor.
What am I missing?
Upvotes: 0
Views: 1492