PulthApp

Google Flutter mastery guide

What is Flutter? 

Created by Google, it is a UI toolkit made for crafting applications across desktops, mobile phones, and the web. It was launched in 2018, it has a flexible design allowing developers to create high-performance apps.

Variables in Flutter

There are 2 main types:

Local - inside a function, accessed only within that function

Instance - declared within a class, accessed through that entire class

Data types in Flutter

Flutter uses Dart which is a language that supports static typing, that also uses built-in data types:

int, double, string, bool, list, map

Object-oriented Dart

Dart is an object-oriented language, that treats functions like objects. This makes this language very flexible allowing functions to be assigned to variables, passed in as arguments.

Operators in Flutter

Arithmetic - Addition, subtraction, multiplication, division

Relational - compare values, that return a boolean value

Logical - AND, OR, NOT

Assignment - Assigns value to variables

Ternary - A way of writing if else statements

Control flow in Dart

Dart uses control flow statements to manage program execution. Types include:

if else - executes on a condition that is based on a boolean expression

for loop - repeats a block of code N times

while loop - repeats a block of code while a condition is true

do while loop - similar to while but executes at least once

switch case - selects one of several blocks of code based on value

break - exit loop

continue - skips iteration in the loop

Setting up

Download from the official website https://flutter.dev/docs/get-started/install

Use an IDE ( I recommend Android Studio)

Use Android Studio's emulator for testing

Dart SDK - Included in Flutter SDK

Widgets

These are the building blocks inside Flutter's UI, defining how a UI looks or behaves.

Inherited Widgets:

This widget plays a crucial role in sharing data efficiently, it helps manage state as well as continue updates ensuring responsive UI.

Stateless and Stateful Widgets:

Stateless - immutable, rebuilding updates the UI each time

Stateful - dynamic, changes appearance in response to user events

Styled Widgets

Allow developers to enhance visuals inside the application. You can customize existing widgets. You can use widgets like container, theme, or box decoration to customize width height padding color margin. It is essential for creating visually appealing applications.

1

9 views
Iduka Naranbaatar

Iduka Naranbaatar

2 Comments


https://lh3.googleusercontent.com/a/ACg8ocJ3TCdVzY-RSgdccr_8vtQ052kCnrQR84sW7ixeebDKYdY=s96-c profile image
ÜZEYİR YARIZ

AAAA VERY GOOOD

https://lh3.googleusercontent.com/a/ACg8ocJnUR2ielAj6_a8wlmo5GGt7xSae8dYSrU_z9tNvbJ8stM=s96-c profile image
Ali Renan Uyanıkedited

IDUKA I LOVE YOU BROTHER THANKS FOR ARTICLE AND LEARN FLUTTER BEFORE WRITING ARTICLE ❤️