Uq21ca723b 20230316213047

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

SERVERLESS APPLICATION DEVELOPMENT

Tamal Dey
Computer Applications
SERVERLESS APPLICATION DEVELOPMENT

Introduction to Flutter
First Flutter Program

Tamal Dey
Computer Applications
SERVERLESS APPLICATION DEVELOPMENT
Recap

• Flutter Tool chain

• Flutter SDK

• Install Flutter

• Install Android Studio

• Install VS Studio Code


SERVERLESS APPLICATION DEVELOPMENT
First Flutter Program

• A new project can be created

• Command line

• Directly from the editor


SERVERLESS APPLICATION DEVELOPMENT
Creating the Project
• Open the command palette
• Ctrl+Shift+P
SERVERLESS APPLICATION DEVELOPMENT
Creating the project

•Type Flutter in the command palette


SERVERLESS APPLICATION DEVELOPMENT
Creating the project

• Select New Application Project


SERVERLESS APPLICATION DEVELOPMENT
Creating the folder

• Select the folder to create the project


SERVERLESS APPLICATION DEVELOPMENT
Naming the project

• Give a name to the project : hello_world


SERVERLESS APPLICATION DEVELOPMENT
Naming the project


SERVERLESS APPLICATION DEVELOPMENT
Naming the project

• The project is created.


SERVERLESS APPLICATION DEVELOPMENT
Creating the code

• The file called main.dart inside lib is where the code will be

written.

• Delete the content/code.


SERVERLESS APPLICATION DEVELOPMENT
Creating the code

• import 'package:flutter/material.dart';

• This package contains widgets that implement Material

Design.

• Material Design is a design language developed by Google

and contains several widgets.

• Package is a library of functions.


SERVERLESS APPLICATION DEVELOPMENT
Creating the code

• Create main() which is the entry point of a flutter app.

• Call runApp method

• Inflates a widget and attaches it to the screen.


SERVERLESS APPLICATION DEVELOPMENT
Creating the code

import 'package:flutter/material.dart';

void main(List<String> args) {


runApp(Center(
child: new Text(
"Hello Flutter",
textDirection: TextDirection.ltr,
)));
}
SERVERLESS APPLICATION DEVELOPMENT
Creating the code

import 'package:flutter/material.dart';

void main(List<String> args){


runApp(const Center(child: Text(
"Hello Flutter",
textDirection : TextDirection.ltr,
)));
}
SERVERLESS APPLICATION DEVELOPMENT
Creating the code

• Center() is a container widget that centers its content

onto the screen.

• Child is a property that allows the nesting of widgets

inside other widgets.

• Text is a simple text box.

• Specify the text direction – left to right


SERVERLESS APPLICATION DEVELOPMENT
Debugging

• To debug click on Open launch.json button.

• Click on Start Debugging.


SERVERLESS APPLICATION DEVELOPMENT
Recap

• Create a project

• Use main.dart

• Open launch.json
Thank you

Tamal Dey
Computer Applications

You might also like