SlideShare a Scribd company logo
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Pemrograman Mobile
Akhmad Khanif Zyen
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
CPMK
• Mahasiswa mampu melakukan instalasi dan menjelaskan struktur file dan widget
• Mahasiswa mampu menulis kode program widget berikut dengan baik:
• MaterialApp, Scaffold, AppBar, Drawer, BottomNavigationBar, floatingActionButton
• Container, Text, Network Image, Asset Image,
• ListView, GridView, Row, Column, Expanded, Flexible,
• Stack, Align, Positioned, Aspect Ratio, Card, Wrap,
• Stateful, BottomNavigationBar, Page Navigation, Transition,
• Named Route & Pass Argument, Route Replacement & Clear Route Stack
• AppBar, SliverAppBar, TabBar, TabView, Drawer, DrawerHeader,
• ElevatedButton, TextButton, OutlinedButton, FloatingActionButton,
• TextField, DateTime, DateFormat, Dropdown, Checkbox, Radio, Switch
• Form Validation, Dialog, BottomSheets
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Pertemuan 1
• Sub CPMK :
• Mahasiswa mampu melakukan instalasi dan menjelaskan struktur file dan
widget
• Prasyarat:
• Mengetahui dasar pemrograman dart
• Mengetahui dasar OOP
• Bahan Kajian
• Perkenalan, Instalasi SDK, Emulator, dan Editor
• MaterialApp, Scaffold, AppBar, BottomNavigationBar,
• Drawer, floatingActionButton
• Container, Text, Image Asset, Network Image
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Pendahuluan dan instalasi
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Mind Map
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Pendahuluan
• Flutter adalah framework yang dibuat dari bahasa pemrograman
Dart, dikembangkan oleh Google, untuk membangun aplikasi
berbasis UI untuk mobile, web, dan desktop
• Waktu development yang lebih cepat dengan fitur hot reload
• UI yang disusun dari widget-widget
• Performa yang mendekati native.
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Persyaratan
sistem/hardware
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Instalasi Android/Flutter
SDK
• Sistem Operasi: Windows, Mac, Linux
• Git: untuk instalasi melalui command git clone atau untuk menjalankan
flutter upgrade (https://git-scm.com/downloads)
• Android studio : hanya dipakai android SDKnya saja
(https://developer.android.com/studio) lakukan instalasi wizard android
SDK, kemudian masuk ke SDK Manager > SDK Tools > centang Show
Package Detail > centang Android sdk command line tools latest, klik
Apply untuk instal.
• Flutter SDK: (https://docs.flutter.dev/get-started/install ), download dan
ekstrak biasa misal di C:, kemudian tambahkan environment variable
untuk flutter binary, misal berlokasi di C:flutterbin
• Tambahkan environment variabel untuk platform-tools dari Android SDK,
misal berlokasi di C:UserskhanifAppDataLocalAndroidSdkplatform-
tools
• Jalankan flutter doctor untuk memeriksa apakah sistem kita sudah
memenuhi syarat.
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Emulator/devices
• Anda bisa menggunakan emulator jika RAM anda minimal 8G
• Anda bisa menambahkan emulator melalui android studio, masuk
ke AVD Manager, klik Create Virtual Device, kemudian pilih
hardware profile (misal Pixel 2), kemudian pilih system image (misal
Pie dan pastikan memiliki google play), kemudian klik Finish
• Untuk RAM dibawah 8GB atau demi kenyamanan, anda bisa
menggunakan device langsung dari smartphone android yang anda
miliki dihubungkan ke USB.
• Aktifkan terlebih dahulu mode USB Debugging pada perangkat
android anda dan mode USB pastikan pada mode transfer file
• Jalankan perintah flutter devices untuk melihat device yang bisa
digunakan untuk development
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Instalasi IDE
• Visual Studio Code: (https://code.visualstudio.com/download),
download dan instal, kemudian install extensions flutter, bracket
pair colorizer 2, pubspec assist, material icon theme, prettier
• Create project melalui menu View > Command Pallete > ketik
Flutter New Project > pilih Application > pilih lokasi folder >
masukkan nama project misal my_project_nim. Tunggu hingga
proses building pertama kali selesai.
• Untuk run project, anda bisa memlih device yang tersedia terlebih
dahulu, dan jika device tersebut adalah emulator pastikan running
terlebih dahulu.
• Klik Run > Run without debugging, tunggu hingga tampilan aplikasi
counter berjalan pada emulator/device fisik.
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Upgrade Flutter
• sangat disarankan anda menggunakan channel beta, caranya
dengan menjalankan perintah flutter channel beta
• Lakukan upgrade dengan perintah flutter upgrade
• Tunggu hingga proses upgrade selesai.
• Baiknya anda rutin menjalankan perintah flutter upgrade satu
bulan sekali untuk memperbarui flutter SDK yang ada di komputer
anda.
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Basic Widget
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Tipe widget
• Seluruh tampilan UI dalam flutter disusun dari widget-widget.
• Widget dalam Flutter terdiri dari 2 jenis yaitu Stateless Widget dan
Stateful Widget
• Stateless widget merupakan widget yang statis dimana tidak ada
perubahan nilai/value dalam satu layar.
• Stateful widget merupakan widget yang mana dalam satu layar ada
minimal satu widget yang memiliki kemungkinan untuk perubahan
nilai. Nilai disini disebut sebagai state.
• Contoh dalam aplikasi counter terdapat value yang selalu berubah
ketika FAB ditekan. Maka dalam satu page widget sebagai
extends/turunan dari Stateful Widget.
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Widget Tree
• Sebuah halaman/page merupakan sebuah widget, dimana
didalamnya terdiri dari widget-widget
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Material
• Material design merupakan prinsip-prinsiap desain yang
dikembangkan oleh google (https://material.io/)
• Berbagai macam UI berbasis material design disediakan oleh Flutter
SDK (https://docs.flutter.dev/development/ui/widgets/material ).
• Sebelum menggunakan widget2 diatas, harus dibungkus dengan
widget MaterialApp karena memiliki property home untuk
menampung widget
• Lebih banyak digunakan untuk theming dan routing
• https://api.flutter.dev/flutter/material/MaterialApp-class.html
• https://khanifzyen.com/2021/10/17/tutorial-flutter-02-
materialapp-widget/
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Widget Scaffold
• mengimplementasikan dasar struktur visual layout dari Material
Design
• Memakan seluruh layar yang dibagi-bagi kedalam beberapa widget
• Widget2 didalamnya seperti Drawer, AppBar, BottomNavigationBar,
FloatingActionButton
• Scaffold memiliki property body yang dapat diisi untuk membangun
UI, posisi tampilan terletak diantara appBar dan
bottomNavigationBar
• https://api.flutter.dev/flutter/material/Scaffold-class.html
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
main.dart
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Drawer (lanjutkan dari
project sebelumnya)
Pada Scaffold terdapat property
drawer yang dapat disi dengan widget
Drawer, biasanya sebagai menu burger
icon yang terletak pada AppBar
https://api.flutter.dev/flutter/material
/Drawer-class.html
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
AppBar (lanjutkan dari
project sebelumnya)
https://api.flutter.dev/flutter/mat
erial/AppBar-class.html
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
BottomNavigationBar
(buat project baru)
1
2
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
BottomNavigationBar
https://api.flutter.dev/flutter/materi
al/BottomNavigationBar-class.html
3
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
BottomNavigationBar
source code:
https://gist.github.com/khanifzyen2/e0fecef603472412a17f2f7d9aa81
77c
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
FloatingActionButton
(lanjutkan project
sebelumnya)
• merupakan ciri khas material
layout yaitu berupa button
yang tetap floating, biasanya
terletak di kanan bawah dan
berbentuk lingkaran dan
terdapat icon didalamnya.
• memiliki method yang sama
seperti button pada umumnya
yaitu onPressed
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
FloatingActionButton
source code:
https://gist.github.com/khanifzyen2/abddafd299b17e74c0ee46fc1940
fec6
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Container
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Mindmap
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Container
(buat project baru)
• container termasuk ke dalam
kelompok layout
• digunakan sebagai
pembungkus untuk widget lain
agar memiliki color, padding,
margin dan dekorasi yang lain
(box, borderRadius dll)
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Container
• jika ingin menambah
box dan memberi warna
juga, maka property
color dipindahkan
kedalam widget
BoxDecoration
• terdapat juga property
transform untuk
melakukan rotate pada
container
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Text
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Text
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Text (lanjut project
sebelumnya)
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Text
source code:
https://gist.github.com/khanifzyen2/9af1ac5d5387832961cc32a08a58
038c
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Image Asset & Network Image
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Network Image
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Network Image
Buat project baru, dengan isi
MyApp > MaterialApp > SafeArea >
Scaffold > body: Center > Container
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Property alignment
• Mulai tambahkan child dalam Container, yaitu Image.network()
• Memiliki property alignment, untuk mengatur posisi gambar
terhadap induk (contoh disini berarti Container)
• Alignment.topLeft
• Alignment.topCenter
• Alignment.topRight
• Alignment.center
• Alignment.bottomLeft
• Alignment.bottomCenter
• Alignment.bottomRight
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Property color dan
colorBlend
• Property color untuk memberi warna pada image
• Property blendMode untuk jenis campuran (blend) antara image
dan color
• BlendMode.color
• BlendMode.colorBurn
• BlendMode.colorDodge
• BlendMode.darken
• BlendMode.difference
• dan lain lain silahkan dicoba sendiri
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Property color dan
colorBlend
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Property fit
• fit untuk mengatur seberapa besar image akan
memenuhi induknya (Container)
• BoxFit.contain
• BoxFit.cover
• BoxFit.fill
• BoxFit.fitWidth
• BoxFit.fitHeight
• BoxFit.none
• BoxFit.scaleDown
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Property repeat
• repeat agar gambar muncul berulang-ulang
hingga memenuhi induknya (container)
• ImageRepeat.repeat
• ImageRepeat.repeatX
• ImageRepeat.repeatY
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Image Asset
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Image asset
• Image akan dibundling dalam package aplikasi
• Letakkan image dalam folder assets/images
• Daftarkan assets dalam file pubspec.yaml
• Panggil dengan Image.asset()
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Circular image
source code:
https://gist.github.com/khanifzyen2/0bb25bb0a34df62fd51e1bc250e3
a7d5
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Circular Image dengan
ClipOval
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Circular Image dengan
ClipOval
source code:
https://gist.github.com/khanifzyen2/3e0bab
1fe7271ddec97e90a288a50649
TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
Daftar Pustaka
[1] -, “Flutter Tutorial for Beginners #1 Intro & Setup”, Flutter, [Online]. Tersedia:
https://www.youtube.com/watch?v=dgfD3qbjf4Y [Diakses 22 Januari 2022].
[2] -, “Flutter Tutorial for Beginners #2 File Structure & Widget Introduction”,
Flutter, [Online]. Tersedia: https://www.youtube.com/watch?v=9mnHP81D6C4
[Diakses 22 Januari 2022].
[3] -, “Flutter Tutorial for Beginners #3 Container Widget & Text Widget”, Flutter,
[Online]. Tersedia: https://www.youtube.com/watch?v=Vg2zmH1G2mQ [Diakses
22 Januari 2022].
[4] -, “Flutter Tutorial for Beginners #4 Network Image & Asset Image”, Flutter,
[Online]. Tersedia: https://www.youtube.com/watch?v=azmVWauXUvc [Diakses
21 Maret 2022].

More Related Content

What's hot (20)

PPTX
PPT Jaringan Komputer
Faksi
 
PPTX
aplikasi komputer pendidikan
sosialmedia4
 
PPTX
Laporan pembuatan aplikasi my so untuk android ppt
Wahyu Anggara
 
PPTX
Ppt seminar kp
Riza Prapascatama Agusdin
 
PPT
Konstruksi perangkat lunak
Ainul Yaqin
 
PDF
Perancangan Data Warehouse (Logical dan Physical)
dedidarwis
 
PPTX
Belajar Pemrograman Scratch Part 1
Joko Prasetyo
 
PPTX
PERANCANGAN PERANGKAT LUNAK
Dhika The'Lover
 
DOCX
Tugas imk hta
Ismi Islamia
 
PPTX
PENGEMBANGAN MULTIMEDIA INTERAKTIF
Hengki Yudha Barnaba, M.Pd
 
PPTX
Tata kelola teknologi informasi
Faith Posumah
 
PPT
Pertemuan 2 - Organisasi dan Arsitektur Komputer.ppt
agro6
 
PPTX
Instalasi jaringan komputer
RogerJulianto
 
PDF
[RPL2] Pengujian Perangkat Lunak
rizki adam kurniawan
 
PDF
Materi photoshop-1
Edith Tama
 
PDF
Konsep dasar UI/UX
Deska Setiawan Yusra
 
PPTX
Rpl 3-manajemen proyek pl
f' yagami
 
PPTX
Tatakelola Teknologi Informasi
Cahyo Darujati
 
PDF
Arsitektur cpu
Mabekni Yulianto
 
PDF
4 diagram relasi antar entitas (ERD)
Simon Patabang
 
PPT Jaringan Komputer
Faksi
 
aplikasi komputer pendidikan
sosialmedia4
 
Laporan pembuatan aplikasi my so untuk android ppt
Wahyu Anggara
 
Konstruksi perangkat lunak
Ainul Yaqin
 
Perancangan Data Warehouse (Logical dan Physical)
dedidarwis
 
Belajar Pemrograman Scratch Part 1
Joko Prasetyo
 
PERANCANGAN PERANGKAT LUNAK
Dhika The'Lover
 
Tugas imk hta
Ismi Islamia
 
PENGEMBANGAN MULTIMEDIA INTERAKTIF
Hengki Yudha Barnaba, M.Pd
 
Tata kelola teknologi informasi
Faith Posumah
 
Pertemuan 2 - Organisasi dan Arsitektur Komputer.ppt
agro6
 
Instalasi jaringan komputer
RogerJulianto
 
[RPL2] Pengujian Perangkat Lunak
rizki adam kurniawan
 
Materi photoshop-1
Edith Tama
 
Konsep dasar UI/UX
Deska Setiawan Yusra
 
Rpl 3-manajemen proyek pl
f' yagami
 
Tatakelola Teknologi Informasi
Cahyo Darujati
 
Arsitektur cpu
Mabekni Yulianto
 
4 diagram relasi antar entitas (ERD)
Simon Patabang
 

Similar to Pemrograman Mobile Pertemuan 1 (14)

PDF
Pemrograman Mobile Unit 1 : Perkenalan
Akhmad Khanif Zyen
 
PPTX
Presentation1 [Autosaved].pptx
NyomanChannel
 
PDF
FIC - Flutter Basic.pdf
herminsusilo2
 
PDF
flutter basic learning dart lanuage jago flutter dart
suryantzz1
 
PDF
Provis_W13.pdf
WerdiMayang
 
PPTX
Seni Digitaliasi Al-Quran (VSC Praktek Sederhana).pptx
DramaturgiPenerbitan
 
PDF
Study Jam Mobile 4 - Introduction to Flutter.pdf
anjarmath
 
PDF
FB-CWB-Dart-Language-Programming.pdf dart flutter sampai jago
suryantzz1
 
PPTX
materi pengenalan flutter bahasa indonesia
strawhat35
 
PDF
Mobile Development (Flutter) | Webinar UBSI
Edi Kurniawan
 
PPTX
Fajarul Akbar - Introduction & Installation to Flutter.pptx
IndahSariSitorus2MIM
 
PPTX
GDSC UTM Info Session - Flutter in Nutshell
RobbyAlamsyah3
 
PPTX
Materi Kuliah AB Pertemuan 2 fluter .pptx
lisda49
 
PDF
Pemrograman Aplikasi Mobile - 1 Kontrak Perkuliahan
AndiNurkholis1
 
Pemrograman Mobile Unit 1 : Perkenalan
Akhmad Khanif Zyen
 
Presentation1 [Autosaved].pptx
NyomanChannel
 
FIC - Flutter Basic.pdf
herminsusilo2
 
flutter basic learning dart lanuage jago flutter dart
suryantzz1
 
Provis_W13.pdf
WerdiMayang
 
Seni Digitaliasi Al-Quran (VSC Praktek Sederhana).pptx
DramaturgiPenerbitan
 
Study Jam Mobile 4 - Introduction to Flutter.pdf
anjarmath
 
FB-CWB-Dart-Language-Programming.pdf dart flutter sampai jago
suryantzz1
 
materi pengenalan flutter bahasa indonesia
strawhat35
 
Mobile Development (Flutter) | Webinar UBSI
Edi Kurniawan
 
Fajarul Akbar - Introduction & Installation to Flutter.pptx
IndahSariSitorus2MIM
 
GDSC UTM Info Session - Flutter in Nutshell
RobbyAlamsyah3
 
Materi Kuliah AB Pertemuan 2 fluter .pptx
lisda49
 
Pemrograman Aplikasi Mobile - 1 Kontrak Perkuliahan
AndiNurkholis1
 
Ad

More from Akhmad Khanif Zyen (13)

PDF
Yii2 fundamentals bagian 1
Akhmad Khanif Zyen
 
PDF
Mobile app syllabus 2019
Akhmad Khanif Zyen
 
PDF
Mobile Application 2 Pertemuan 5 Dasar Kotlin OOP Nested Class and Packages
Akhmad Khanif Zyen
 
PDF
Mobile Application 2 Pertemuan 4 Dasar Kotlin OOP Polymorphism
Akhmad Khanif Zyen
 
PDF
Mobile Application 2 Pertemuan 3 Dasar Kotlin Object Oriented Programming
Akhmad Khanif Zyen
 
PDF
Mobile Application 2 Pertemuan 2 Dasar Kotlin Loop Control, Collection dan Fu...
Akhmad Khanif Zyen
 
PDF
Mobile Application 2 Pertemuan 1 Pengantar Kotlin
Akhmad Khanif Zyen
 
PDF
Filosofi belajar abad 21
Akhmad Khanif Zyen
 
ODP
Perintah dasar Linux
Akhmad Khanif Zyen
 
PDF
Surat keterangan garansi software
Akhmad Khanif Zyen
 
PDF
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework Bagian 3
Akhmad Khanif Zyen
 
PDF
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 2
Akhmad Khanif Zyen
 
ODP
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1
Akhmad Khanif Zyen
 
Yii2 fundamentals bagian 1
Akhmad Khanif Zyen
 
Mobile app syllabus 2019
Akhmad Khanif Zyen
 
Mobile Application 2 Pertemuan 5 Dasar Kotlin OOP Nested Class and Packages
Akhmad Khanif Zyen
 
Mobile Application 2 Pertemuan 4 Dasar Kotlin OOP Polymorphism
Akhmad Khanif Zyen
 
Mobile Application 2 Pertemuan 3 Dasar Kotlin Object Oriented Programming
Akhmad Khanif Zyen
 
Mobile Application 2 Pertemuan 2 Dasar Kotlin Loop Control, Collection dan Fu...
Akhmad Khanif Zyen
 
Mobile Application 2 Pertemuan 1 Pengantar Kotlin
Akhmad Khanif Zyen
 
Filosofi belajar abad 21
Akhmad Khanif Zyen
 
Perintah dasar Linux
Akhmad Khanif Zyen
 
Surat keterangan garansi software
Akhmad Khanif Zyen
 
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework Bagian 3
Akhmad Khanif Zyen
 
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 2
Akhmad Khanif Zyen
 
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1
Akhmad Khanif Zyen
 
Ad

Recently uploaded (20)

PPTX
Penulisan Karya Ilmiah dalam Penelitian Pendidikan, Bahasa dan Sastra
IKIP Siliwangi
 
PPTX
Doa Syafaat Profetis-1.pptx Persekutuan Doa Karismatik Katolik
Mario181215
 
PPTX
Asset Selection and Criticality_Training *ASSET INTEGRITY MANAGEMENT (AiM).pptx
Kanaidi ken
 
PPTX
PPT PROPOSAL PjBL - KEL 2 Kewarganegaraan.pptx
HelenaManurung
 
PPTX
PPT NGEBASO Uji pengetahuan PPG 2025 .pptx
AlMungadim
 
DOCX
PENGARUH BRAND IMAGE DAN KUALITAS PRODUK TERHADAP LOYALITAS MEREK PRODUK SKIN...
qq4vet8b9b
 
PDF
Modul Ajar Matematika Kelas 11 Deep Learning
Adm Guru
 
PDF
Modul Ajar Informatika Kelas 9 Deep Learning
Adm Guru
 
PDF
Modul Ajar IPA Kelas 9 Deep Learning Terbaru
Adm Guru
 
PPTX
Bahan KKA dan PM_DinasPendidikan_Dinas Pendidikan,Bahan KKA dan PM_DinasPendi...
sefurohman1
 
PPTX
Failure Modes and Mechanisms_Training *ASSET INTEGRITY MANAGEMENT (AiM).pptx
Kanaidi ken
 
PDF
AIM Program Implementation_Training *ASSET INTEGRITY MANAGEMENT (AiM)*.pdf
Kanaidi ken
 
PPTX
Awal-Muharram-Fajar-Permulaan-Baharu (1).pptx
g08120045
 
PDF
Modul Ajar Ekonomi Kelas 10 Deep Learning
Adm Guru
 
PDF
Modul Ajar Informatika Kelas 7 Deep Learning
Adm Guru
 
PPTX
Asset Integrity Procedures_Training *ASSET INTEGRITY MANAGEMENT (AiM)*.pptx
Kanaidi ken
 
PPTX
Performance Matric, Audit & Continoues Improvement_Training *ASSET INTEGRITY ...
Kanaidi ken
 
PDF
2.3 Lampiran I.C PP Nomor 28 Tahun 2025 (I.C.1-182).pdf
medinanuralisha32
 
PPTX
presentasi pendidikan moral pancasila go
DonnyWicaksono7
 
PDF
Uji Toksisitas Akut Pra-Klinik (In Vivo)
Apothecary Indonesia Persada
 
Penulisan Karya Ilmiah dalam Penelitian Pendidikan, Bahasa dan Sastra
IKIP Siliwangi
 
Doa Syafaat Profetis-1.pptx Persekutuan Doa Karismatik Katolik
Mario181215
 
Asset Selection and Criticality_Training *ASSET INTEGRITY MANAGEMENT (AiM).pptx
Kanaidi ken
 
PPT PROPOSAL PjBL - KEL 2 Kewarganegaraan.pptx
HelenaManurung
 
PPT NGEBASO Uji pengetahuan PPG 2025 .pptx
AlMungadim
 
PENGARUH BRAND IMAGE DAN KUALITAS PRODUK TERHADAP LOYALITAS MEREK PRODUK SKIN...
qq4vet8b9b
 
Modul Ajar Matematika Kelas 11 Deep Learning
Adm Guru
 
Modul Ajar Informatika Kelas 9 Deep Learning
Adm Guru
 
Modul Ajar IPA Kelas 9 Deep Learning Terbaru
Adm Guru
 
Bahan KKA dan PM_DinasPendidikan_Dinas Pendidikan,Bahan KKA dan PM_DinasPendi...
sefurohman1
 
Failure Modes and Mechanisms_Training *ASSET INTEGRITY MANAGEMENT (AiM).pptx
Kanaidi ken
 
AIM Program Implementation_Training *ASSET INTEGRITY MANAGEMENT (AiM)*.pdf
Kanaidi ken
 
Awal-Muharram-Fajar-Permulaan-Baharu (1).pptx
g08120045
 
Modul Ajar Ekonomi Kelas 10 Deep Learning
Adm Guru
 
Modul Ajar Informatika Kelas 7 Deep Learning
Adm Guru
 
Asset Integrity Procedures_Training *ASSET INTEGRITY MANAGEMENT (AiM)*.pptx
Kanaidi ken
 
Performance Matric, Audit & Continoues Improvement_Training *ASSET INTEGRITY ...
Kanaidi ken
 
2.3 Lampiran I.C PP Nomor 28 Tahun 2025 (I.C.1-182).pdf
medinanuralisha32
 
presentasi pendidikan moral pancasila go
DonnyWicaksono7
 
Uji Toksisitas Akut Pra-Klinik (In Vivo)
Apothecary Indonesia Persada
 

Pemrograman Mobile Pertemuan 1

  • 1. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Pemrograman Mobile Akhmad Khanif Zyen
  • 2. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id CPMK • Mahasiswa mampu melakukan instalasi dan menjelaskan struktur file dan widget • Mahasiswa mampu menulis kode program widget berikut dengan baik: • MaterialApp, Scaffold, AppBar, Drawer, BottomNavigationBar, floatingActionButton • Container, Text, Network Image, Asset Image, • ListView, GridView, Row, Column, Expanded, Flexible, • Stack, Align, Positioned, Aspect Ratio, Card, Wrap, • Stateful, BottomNavigationBar, Page Navigation, Transition, • Named Route & Pass Argument, Route Replacement & Clear Route Stack • AppBar, SliverAppBar, TabBar, TabView, Drawer, DrawerHeader, • ElevatedButton, TextButton, OutlinedButton, FloatingActionButton, • TextField, DateTime, DateFormat, Dropdown, Checkbox, Radio, Switch • Form Validation, Dialog, BottomSheets
  • 3. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Pertemuan 1 • Sub CPMK : • Mahasiswa mampu melakukan instalasi dan menjelaskan struktur file dan widget • Prasyarat: • Mengetahui dasar pemrograman dart • Mengetahui dasar OOP • Bahan Kajian • Perkenalan, Instalasi SDK, Emulator, dan Editor • MaterialApp, Scaffold, AppBar, BottomNavigationBar, • Drawer, floatingActionButton • Container, Text, Image Asset, Network Image
  • 4. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Pendahuluan dan instalasi
  • 5. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Mind Map
  • 6. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Pendahuluan • Flutter adalah framework yang dibuat dari bahasa pemrograman Dart, dikembangkan oleh Google, untuk membangun aplikasi berbasis UI untuk mobile, web, dan desktop • Waktu development yang lebih cepat dengan fitur hot reload • UI yang disusun dari widget-widget • Performa yang mendekati native.
  • 7. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Persyaratan sistem/hardware
  • 8. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Instalasi Android/Flutter SDK • Sistem Operasi: Windows, Mac, Linux • Git: untuk instalasi melalui command git clone atau untuk menjalankan flutter upgrade (https://git-scm.com/downloads) • Android studio : hanya dipakai android SDKnya saja (https://developer.android.com/studio) lakukan instalasi wizard android SDK, kemudian masuk ke SDK Manager > SDK Tools > centang Show Package Detail > centang Android sdk command line tools latest, klik Apply untuk instal. • Flutter SDK: (https://docs.flutter.dev/get-started/install ), download dan ekstrak biasa misal di C:, kemudian tambahkan environment variable untuk flutter binary, misal berlokasi di C:flutterbin • Tambahkan environment variabel untuk platform-tools dari Android SDK, misal berlokasi di C:UserskhanifAppDataLocalAndroidSdkplatform- tools • Jalankan flutter doctor untuk memeriksa apakah sistem kita sudah memenuhi syarat.
  • 9. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Emulator/devices • Anda bisa menggunakan emulator jika RAM anda minimal 8G • Anda bisa menambahkan emulator melalui android studio, masuk ke AVD Manager, klik Create Virtual Device, kemudian pilih hardware profile (misal Pixel 2), kemudian pilih system image (misal Pie dan pastikan memiliki google play), kemudian klik Finish • Untuk RAM dibawah 8GB atau demi kenyamanan, anda bisa menggunakan device langsung dari smartphone android yang anda miliki dihubungkan ke USB. • Aktifkan terlebih dahulu mode USB Debugging pada perangkat android anda dan mode USB pastikan pada mode transfer file • Jalankan perintah flutter devices untuk melihat device yang bisa digunakan untuk development
  • 10. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Instalasi IDE • Visual Studio Code: (https://code.visualstudio.com/download), download dan instal, kemudian install extensions flutter, bracket pair colorizer 2, pubspec assist, material icon theme, prettier • Create project melalui menu View > Command Pallete > ketik Flutter New Project > pilih Application > pilih lokasi folder > masukkan nama project misal my_project_nim. Tunggu hingga proses building pertama kali selesai. • Untuk run project, anda bisa memlih device yang tersedia terlebih dahulu, dan jika device tersebut adalah emulator pastikan running terlebih dahulu. • Klik Run > Run without debugging, tunggu hingga tampilan aplikasi counter berjalan pada emulator/device fisik.
  • 11. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Upgrade Flutter • sangat disarankan anda menggunakan channel beta, caranya dengan menjalankan perintah flutter channel beta • Lakukan upgrade dengan perintah flutter upgrade • Tunggu hingga proses upgrade selesai. • Baiknya anda rutin menjalankan perintah flutter upgrade satu bulan sekali untuk memperbarui flutter SDK yang ada di komputer anda.
  • 12. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Basic Widget
  • 13. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
  • 14. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Tipe widget • Seluruh tampilan UI dalam flutter disusun dari widget-widget. • Widget dalam Flutter terdiri dari 2 jenis yaitu Stateless Widget dan Stateful Widget • Stateless widget merupakan widget yang statis dimana tidak ada perubahan nilai/value dalam satu layar. • Stateful widget merupakan widget yang mana dalam satu layar ada minimal satu widget yang memiliki kemungkinan untuk perubahan nilai. Nilai disini disebut sebagai state. • Contoh dalam aplikasi counter terdapat value yang selalu berubah ketika FAB ditekan. Maka dalam satu page widget sebagai extends/turunan dari Stateful Widget.
  • 15. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Widget Tree • Sebuah halaman/page merupakan sebuah widget, dimana didalamnya terdiri dari widget-widget
  • 16. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Material • Material design merupakan prinsip-prinsiap desain yang dikembangkan oleh google (https://material.io/) • Berbagai macam UI berbasis material design disediakan oleh Flutter SDK (https://docs.flutter.dev/development/ui/widgets/material ). • Sebelum menggunakan widget2 diatas, harus dibungkus dengan widget MaterialApp karena memiliki property home untuk menampung widget • Lebih banyak digunakan untuk theming dan routing • https://api.flutter.dev/flutter/material/MaterialApp-class.html • https://khanifzyen.com/2021/10/17/tutorial-flutter-02- materialapp-widget/
  • 17. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Widget Scaffold • mengimplementasikan dasar struktur visual layout dari Material Design • Memakan seluruh layar yang dibagi-bagi kedalam beberapa widget • Widget2 didalamnya seperti Drawer, AppBar, BottomNavigationBar, FloatingActionButton • Scaffold memiliki property body yang dapat diisi untuk membangun UI, posisi tampilan terletak diantara appBar dan bottomNavigationBar • https://api.flutter.dev/flutter/material/Scaffold-class.html
  • 18. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id main.dart
  • 19. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Drawer (lanjutkan dari project sebelumnya) Pada Scaffold terdapat property drawer yang dapat disi dengan widget Drawer, biasanya sebagai menu burger icon yang terletak pada AppBar https://api.flutter.dev/flutter/material /Drawer-class.html
  • 20. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id AppBar (lanjutkan dari project sebelumnya) https://api.flutter.dev/flutter/mat erial/AppBar-class.html
  • 21. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id BottomNavigationBar (buat project baru) 1 2
  • 22. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id BottomNavigationBar https://api.flutter.dev/flutter/materi al/BottomNavigationBar-class.html 3
  • 23. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id BottomNavigationBar source code: https://gist.github.com/khanifzyen2/e0fecef603472412a17f2f7d9aa81 77c
  • 24. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id FloatingActionButton (lanjutkan project sebelumnya) • merupakan ciri khas material layout yaitu berupa button yang tetap floating, biasanya terletak di kanan bawah dan berbentuk lingkaran dan terdapat icon didalamnya. • memiliki method yang sama seperti button pada umumnya yaitu onPressed
  • 25. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id FloatingActionButton source code: https://gist.github.com/khanifzyen2/abddafd299b17e74c0ee46fc1940 fec6
  • 26. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Container
  • 27. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Mindmap
  • 28. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Container (buat project baru) • container termasuk ke dalam kelompok layout • digunakan sebagai pembungkus untuk widget lain agar memiliki color, padding, margin dan dekorasi yang lain (box, borderRadius dll)
  • 29. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Container • jika ingin menambah box dan memberi warna juga, maka property color dipindahkan kedalam widget BoxDecoration • terdapat juga property transform untuk melakukan rotate pada container
  • 30. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id
  • 31. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Text
  • 32. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Text
  • 33. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Text (lanjut project sebelumnya)
  • 34. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Text source code: https://gist.github.com/khanifzyen2/9af1ac5d5387832961cc32a08a58 038c
  • 35. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Image Asset & Network Image
  • 36. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Network Image
  • 37. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Network Image Buat project baru, dengan isi MyApp > MaterialApp > SafeArea > Scaffold > body: Center > Container
  • 38. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Property alignment • Mulai tambahkan child dalam Container, yaitu Image.network() • Memiliki property alignment, untuk mengatur posisi gambar terhadap induk (contoh disini berarti Container) • Alignment.topLeft • Alignment.topCenter • Alignment.topRight • Alignment.center • Alignment.bottomLeft • Alignment.bottomCenter • Alignment.bottomRight
  • 39. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Property color dan colorBlend • Property color untuk memberi warna pada image • Property blendMode untuk jenis campuran (blend) antara image dan color • BlendMode.color • BlendMode.colorBurn • BlendMode.colorDodge • BlendMode.darken • BlendMode.difference • dan lain lain silahkan dicoba sendiri
  • 40. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Property color dan colorBlend
  • 41. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Property fit • fit untuk mengatur seberapa besar image akan memenuhi induknya (Container) • BoxFit.contain • BoxFit.cover • BoxFit.fill • BoxFit.fitWidth • BoxFit.fitHeight • BoxFit.none • BoxFit.scaleDown
  • 42. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Property repeat • repeat agar gambar muncul berulang-ulang hingga memenuhi induknya (container) • ImageRepeat.repeat • ImageRepeat.repeatX • ImageRepeat.repeatY
  • 43. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Image Asset
  • 44. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Image asset • Image akan dibundling dalam package aplikasi • Letakkan image dalam folder assets/images • Daftarkan assets dalam file pubspec.yaml • Panggil dengan Image.asset()
  • 45. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Circular image source code: https://gist.github.com/khanifzyen2/0bb25bb0a34df62fd51e1bc250e3 a7d5
  • 46. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Circular Image dengan ClipOval
  • 47. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Circular Image dengan ClipOval source code: https://gist.github.com/khanifzyen2/3e0bab 1fe7271ddec97e90a288a50649
  • 48. TEKNIK INFORMATIKA UNISNU JEPARA https://tif.unisnu.ac.id Daftar Pustaka [1] -, “Flutter Tutorial for Beginners #1 Intro & Setup”, Flutter, [Online]. Tersedia: https://www.youtube.com/watch?v=dgfD3qbjf4Y [Diakses 22 Januari 2022]. [2] -, “Flutter Tutorial for Beginners #2 File Structure & Widget Introduction”, Flutter, [Online]. Tersedia: https://www.youtube.com/watch?v=9mnHP81D6C4 [Diakses 22 Januari 2022]. [3] -, “Flutter Tutorial for Beginners #3 Container Widget & Text Widget”, Flutter, [Online]. Tersedia: https://www.youtube.com/watch?v=Vg2zmH1G2mQ [Diakses 22 Januari 2022]. [4] -, “Flutter Tutorial for Beginners #4 Network Image & Asset Image”, Flutter, [Online]. Tersedia: https://www.youtube.com/watch?v=azmVWauXUvc [Diakses 21 Maret 2022].