Shortcut | Function |
---|---|
fn + F1 |
Shows documentation |
Shift + alt + S |
Reformat Code with dartfmt |
Cmd + S |
Save File and Flutter Hot Reload |
Cmd + S + Shift |
Flutter Full Reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.valueOf(var).length() //gibt die Länge digits eines ints an |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class HomePage extends StatefulWidget { | |
@override | |
_HomePageState createState() => new _HomePageState(); | |
} | |
class _HomePageState extends State<HomePage> { | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onTap: () => Navigator.of(context).push(new MaterialPageRoute( | |
builder: (BuildContext context) => new OtherPage())) //Page Constructor (Other Page) | |
//Needs to be in a seperate Widget than MaterialApp (no nesting) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SnackBarPage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new Center( | |
child: new RaisedButton( | |
onPressed: () { | |
final snackBar = new SnackBar( | |
content: new Text("Button Pressed"), | |
duration: new Duration(seconds: 5), | |
action: new SnackBarAction( |
Akcronym | Meaning |
---|---|
API |
Application Programming Interface |
SDK |
Software Development Kit |
IDE |
Integrated Development Environment |
SQL |
Structured Query Language (SEQUEL - Structured English Query Language) |
CSS |
Cascading Style Sheets |
HTML |
Hypertext Markup Language |
CMS |
Content Management System (Webpage) |
DOM |
Document Object Model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Image.network( | |
'https://raw.githubusercontent.com/flutter/website/master/_includes/code/layout/lakes/images/lake.jpg', | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Flutter Demo', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in main.dart: | |
// import 'package:fly_library/res/theme.dart' as Theme; | |
import 'package:flutter/material.dart'; | |
final ThemeData myAppTheme = new ThemeData( | |
brightness: Brightness.light, | |
primarySwatch: Colors.blue, | |
primaryColor: Colors.blue[500], | |
primaryColorBrightness: Brightness.light, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Column( | |
children: <Widget>[ | |
new Card( | |
child: new Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
const ListTile( | |
leading: const Icon(Icons.album), | |
title: const Text('The Enchanted Nightingale'), | |
subtitle: const Text( |