Created
November 24, 2019 09:12
-
-
Save YBCS/57102a24621b96d12df0033f33145545 to your computer and use it in GitHub Desktop.
some basic stuff on dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the basics | |
void main() => runApp(MaterialApp( | |
// home: Text('hey ninjas!'), | |
// notice : the widgets starts with upper case | |
// coma follows every property / widgets | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text('my first app'), | |
centerTitle: true, | |
), | |
body: Center( | |
// there should always be property inside widgets | |
child: Text('helo ninja'), | |
), | |
floatingActionButton: FloatingActionButton( | |
child: Text('Click'), | |
), | |
), | |
)); | |
// scaffold allows us to implement more stuff in the home page -- | |
// it is wrapper to many properties such as home body etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment