Bhatti CrossPlatformMobileApplicationDevelopment Unit-1
Bhatti CrossPlatformMobileApplicationDevelopment Unit-1
Introduction
lTwo Options:
¡Develop separate apps for each platform
¡Implement a cross-platform mobile application
What is Flutter?
lPackages+Plugins+Widgets
What is Flutter?
lFramework Layer
¡The Flutter framework provides a reactive and
modern framework written in Dart.
¡Within the framework layer, it comprises of the
following:
lRendering
lWidgets
lMaterial and cupertino
lIt also has foundational classes and building block
services like animation, drawing, and gestures.
lEngine Layer
¡The engine layer is written in C/C++, and it
takes care of the input, output, network
requests, and handles the difficult translation of
rendering whenever a frame needs to be
painted.
¡Flutter use skia as its rendering engine.
lhttps://docs.flutter.dev/get-started/install
lWindows
lmacOS
lLinux
lWindows
¡Git for Windows
¡Get the Flutter SDK
¡Update Your Path
¡“where flutter dart”
¡flutter doctor
¡Install Android Studio
¡Setup Android Emulator
¡Install VS Code (https://code.visualstudio.com)
Prof. (Dr.) Dharmendra Bhatti 21
lmacOS
¡Get the Flutter SDK
¡Update Your Path (.bashrc or .zshrc)
¡flutter doctor
¡Install XCode (if not installed)
¡Install Android Studio
¡Setup Android Emulator
¡Agree to Android Licenses
¡Install VS Code (https://code.visualstudio.com)
with plugin Flutter
Prof. (Dr.) Dharmendra Bhatti 22
lAndroid Studio
¡Create New Flutter project
lVS Code
¡View ▸ Command Palette... ▸ Flutter: New
Project
lTerminal
¡flutter create hello_world
lVS Code
¡Open Project hello_world
¡View ▸ Command Palette... ▸ Flutter: Launch
Emulator
¡Run Without Debugging
¡Hot reload
RecipeApp
lTerminal
¡flutter create recipes
lUsing VS Code, open the recipes folder
as an existing project.
lView ▸ Command Palette... ▸ Flutter:
Launch Emulator
lRun Without Debugging
RecipeApp
What is refactor?
What is widget?
What is scaffold?
lassests:
l - assets/
Prof. (Dr.) Dharmendra Bhatti 41
limport 'recipe.dart';
lreturn
buildRecipeCard(Recipe.samples[index]);
Adding ingredients
Adding ingredients
lint servings;
lList<Ingredient> ingredients;
Adding ingredients
Adding ingredients
lint _sliderVal = 1;
Prof. (Dr.) Dharmendra Bhatti 70
Key points
Key points
Questions ???