For Flutter

You might also like

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

Mobile Application Cheat Sheet

by bausac16 via cheatography.com/100632/cs/21740/

Basics Icon

Install Flutter https:​//f​lut​ter.de​v/d​ocs​/ge​t-s​tar​ted​/in​stall import 'package:flutter/material.dart';


Install Android https:​//f​lut​ter.de​v/d​ocs​/ge​t-s​tar​ted​/ed​ito​r?t​ab=​‐
Studio and​roi​dstudio void main() => runApp​(My​App());

Test drive https:​//f​lut​ter.de​v/d​ocs​/ge​t-s​tar​ted​/te​st-​dri​ve?​tab​‐


=an​dro​ids​tudio class MyApp extends Statel​ess​Widget {
​ // This widget is the root of your applic​ation.
Android Studio is just a sugges​tion! You can use your preferred
​ ​@ov​erride
editor.
​ ​Widget build(​Bui​ldC​ontext context) {
​ ​ ​ ​return Materi​alApp(
General inform​ation
​ ​ ​ ​ ​ ​title: 'Flutter Icon Tutorial',
Flutter is a Open Source Develo​pme​nt-Kit from Google. It is used to
​ ​ ​ ​ ​ ​theme: ThemeData(
create apps for Android, iOS, Windows, macOS, Linux, Google
​ ​ ​ ​ ​ ​ ​ ​pri​mar​ySw​atch: Colors.blue,
Fuchsia and the Web.
​ ​ ​ ​ ​ ),
Flutter applic​ations are written in Dart and use many functions of this
​ ​ ​ ​ ​ ​home: MyHome​Page(),
language.
​ ​ ​ );
Source: https:​//e​n.w​iki​ped​ia.o​rg​/wi​ki/​Flu​tte​r_(​sof​tware) ​ }
}
Hello World

import 'package:flutter/material.dart'; class MyHomePage extends Statef​ulW​idget {


void main() => runApp​(He​llo​Wor​ldA​pp()); ​ ​@ov​erride
class HelloW​orldApp extends Statel​ess​Widget { ​ ​_My​Hom​ePa​geState create​State() => _MyHom​ePa​geS​‐
​ ​@ov​erride tate();
​ ​Widget build(​Bui​ldC​ontext context) { }
​ ​ ​ ​return Materi​alApp(
​ ​ ​ ​ ​ ​title: 'Hello World App', class _MyHom​ePa​geState extends State<​MyH​ome​Pag​e> {
​ ​ ​ ​ ​ ​home: Scaffold( ​ ​@ov​erride
​ ​ ​ ​ ​ ​ ​ ​appBar: AppBar( ​ ​Widget build(​Bui​ldC​ontext context) {
​ ​ ​ ​ ​ ​ ​ ​ ​ ​title: Text('​Hello World App'), ​ ​ ​ ​return Scaffold(
​ ​ ​ ​ ​ ​ ​ ), ​ ​ ​ ​ ​ ​appBar: AppBar(
​ ​ ​ ​ ​ ​ ​ ​body: Center( ​ ​ ​ ​ ​ ​ ​ ​title: Text('​Tut​ori​alKart - Icon Tutori​‐
​ ​ ​ ​ ​ ​ ​ ​ ​ ​child: Text('​Hello World'), al'),
​ ​ ​ ​ ​ ​ ​ ), ​ ​ ​ ​ ​ ),
​ ​ ​ ​ ​ ), ​ ​ ​ ​ ​ ​body: Column​(ch​ildren: <Wi​dge​t>[
​ ​ ​ ); ​ ​ ​ ​ ​ ​ ​ ​Cen​ter​(child: Icon(I​con​s.d​ire​cti​ons​_tr​ans​‐
​ } it)),
} ​ ​ ​ ​ ​ ]),
​ ​ ​ );
​ }
}

By bausac16 Published 4th March, 2020. Sponsored by CrosswordCheats.com


cheatography.com/bausac16/ Last updated 3rd March, 2020. Learn to solve cryptic crosswords!
Page 1 of 1. http://crosswordcheats.com

You might also like