Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 23, 2022 08:14 am GMT

MAKE YOUR FIRST APP IN FLUTTER

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 flutterscd flutterscode .

(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.dartpackage: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.dartvoid 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.


Original Link: https://dev.to/tintujoseph/make-your-first-app-in-flutter-21gl

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To