Flutter: Difference between revisions
add Programming Notes |
mNo edit summary |
||
Line 13: | Line 13: | ||
''runApp()'' function takes the given Widget and makes it the root of the widget tree. The following makes the Center widget the root. | ''runApp()'' function takes the given Widget and makes it the root of the widget tree. The following makes the Center widget the root. | ||
<source lang="dart"> | <source lang="dart" hi="3"> | ||
void main() { | void main() { | ||
runApp( | runApp( |
Revision as of 22:00, 26 September 2018
Set up
Get all packages based on pubspec.yaml.
$ flutter packages get
Running "flutter packages get" in a1... 1.0s
Programming Notes
runApp() function takes the given Widget and makes it the root of the widget tree. The following makes the Center widget the root.
void main() {
runApp(
Center: Text(
'Hello, world!',
textDirection: TextDirection.ltr
)
);
}