You are on page 1of 1

flutter Cheat Sheet

by kahmic16 via cheatography.com/100675/cs/21918/

Flutter Create Widget

What is Flutter? Flutter is Googles toolkit for building beautiful, class RandomWords extends StatefulWidget {
natively compiled applic​ations for mobile, web, ​ ​@ov​erride
and desktop from a single codebase. ​ ​Ran​dom​Wor​dsState create​State() => Random​Wor​dsS​‐
What progra​‐ Dart tate();
mming language }
is Flutter based
on? Add Something to a Widget
When was Flutter December 2018 @override
released? Widget build(​Bui​ldC​ontext context) {
What well-known Alibaba, New York Times, Tencent, Ebay, ​ ​return Scaffold(
apps were BMW, ... ​ ​ ​ ​appBar: AppBar(
created using ​ ​ ​ ​ ​ ​title: Text('​Startup Name Genera​tor'),
Flutter? ​ ​ ​ ),
​ ​ ​ ​body: _build​Sug​ges​tio​ns(),
Hello World in Flutter
​ );
import 'package:flutter/material.dart'; }
void main() => runApp​(He​llo​Wor​ldA​pp());
class HelloW​orldApp extends Statel​ess​Widget { Change appearance of a Widget
​ ​@ov​erride class RandomWordsState extends State<RandomWords>
​ ​Widget build(​Bui​ldC​ontext context) { {
​ ​ ​ ​return Materi​alApp( ​ ​final _sugge​stions = <Wo​rdP​air​>[];
​ ​ ​ ​ ​ ​title: 'Hello World App', ​ ​final _bigge​rFont = const TextSt​yle​(fo​ntSize:
​ ​ ​ ​ ​ ​home: Scaffold( 18.0);
​ ​ ​ ​ ​ ​ ​ ​appBar: AppBar( }
​ ​ ​ ​ ​ ​ ​ ​ ​ ​title: Text('App Bar Title here'),
​ ​ ​ ​ ​ ​ ​ ),
​ ​ ​ ​ ​ ​ ​ ​body: Center(
​ ​ ​ ​ ​ ​ ​ ​ ​ ​child: Text('​Hello World'),
​ ​ ​ ​ ​ ​ ​ ),
​ ​ ​ ​ ​ ),
​ ​ ​ );
​ }
}

By kahmic16 Not published yet. Sponsored by Readable.com


cheatography.com/kahmic16/ Last updated 3rd March, 2020. Measure your website readability!
Page 1 of 1. https://readable.com

You might also like