Member-only story
FOR FUTURE FLUTTERISTAS :)
Flutter and Dart examples for total beginners [Part 1]
Short examples that everyone can understand
Example 1
Add some text on the screen.
You have created you Flutter project, you want to add some simple text on the screen and this happens:
This happens because your app does not know if in your language, you read from the left to right(English and most of other languages) or from the right to left(Arabic, Hebrew, …) and Flutter suggests you to wrap your app into MaterialApp Widget, that already has Directionality Widget(the one we need in order to set text direction) in it. MaterialApp Widget consists of bunch of Widgets that you probably need in your app(Navigator for displaying other screens, Localization for supporting other languages, some default animations etc…) so if you add it in your Widget tree, you will be able to use its features by default :)
Simple!