Show Menu
Cheatography

MobileApplication Cheatsheet Cheat Sheet (DRAFT) by

MobileApplication1 Cheatsheet

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Get Started

Install Flutter
Install Android Studio
Install Flutter plugin in Android Studio
File -> Settings -> Plugins -> Flutter
Iphone as Mobile Device
Buy Developer Account or use Emulator
Other Mobile Device
Connect using by USB and enable Developer Mode
Emulator
AVD Manager -> Create Virtual Device
Hot Reload
STRG+S -> App is updated automa‐ tically

What is Flutter?

open source mobile applic­ation develo­pement SDK
cross platform app develo­pment
code one time for both IOS and Android apps

pubspec code

add dependency example
cupert­ino­_icons: ^0.1.2
 

main.dart code

Importing from a package
import 'packa­ge:­flu­tte­r/m­ate­ria­l.d­art';
Run a class (e.g. MyApp())
void main() => runApp­(My­App());
Set title in appbar
appBar: AppBar( title: Text('­Welcome to Flutter'), )
Set text in the body
body: Center( child: Text('­Hello World'), )
display something in a list
return ListTile( title: Text( pair.asPa‐ scalCase, style: _bigge­rFont, )
random words class
class Random­Wor­dsState extends State<‐ Random­Wor­ds> { @override Widget build(‐ BuildC­ontext context) { final wordPair = WordPa­ir.r­an­dom(); return Text(w­ordPai‐ r.asPa­sca­lCase); } }
set AppBar
return Scaffold( appBar: AppBar( title: Text('­Startup Name Genera­tor'), ), body: _build­Sug­ges­tio­ns(), );