Aim : Introduction to Flutter, create new project, Simple “Hello world” program.
Steps to create new project:
step 1 : create a new folder and open newly created folder in vs code.
Step 2 : open new terminal and type commands :
flutter create abc (abc is a project folder name).
cd abc
flutter run
Simple “hello world” program :
In main.dart file, inside replace the text of Text widget with ”hello world”.
Code:
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'Hello World',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
Output :
Comments
Post a Comment