This content originally appeared on DEV Community and was authored by TINTU JOSEPH
INTRODUCTION
it is open source UI developing kit ,that developed by google in 2015 but it was released in 2017.Main feature of the flutter is used in cross platform application developing.
DART
The one and only programming language that used in flutter is dart.The main feature of the dart language is it is an platform Independent programming language .object oriented ,Mainly it it is a opensource programming language and it easy to learn
Let Started....
Firstly we install the flutter from given (https://docs.flutter.dev/get-started/install)
Create Project
flutter create command used to create the flutter project
syntax:
flutter create flutters
cd flutters
code .
(here we are use vs code to create our project)
Lets Start Our Code
In flutter mainly we are importing to libraries one is cupertino.dart and material.dart. the first one is for Ios app and second one is Android app.
package:flutter/material.dart
package:flutter/cupertino.dart'
Here we use material.dart.which include may widgets materialapp , statefull and stateless etc..
The sample Code given below:
package:flutter/material.dart
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter',
home: Scaffold(
appBar: AppBar(
title: Text(' Our Project'),
),
body: Center(
child: Text('HELLO'),
),
),
);
}
}
void main() -it is the main method \ function of our project.
Scaffold -It is from the Material library, It provides app bar, and a body which contain homescreen.
title - which give title of our app.
center - which is widget which give the text in the center of the screen.
This content originally appeared on DEV Community and was authored by TINTU JOSEPH
TINTU JOSEPH | Sciencx (2022-01-23T08:14:43+00:00) MAKE YOUR FIRST APP IN FLUTTER. Retrieved from https://www.scien.cx/2022/01/23/make-your-first-app-in-flutter/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.