Skip to content

Instantly share code, notes, and snippets.

@kasperpeulen
kasperpeulen / destructering.kt
Created November 9, 2017 15:28 — forked from anonymous/destructering.kt
Desctructering in Kotlin
data class Person(val name: String, val age: Int)
val(name, age) = Person("Guy", 20)

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor
import 'dart:async' show Future;
/// This method answers the ultimate question.
Future doAwesomeThing() => new Future.value(42);
main() async {
var result = await doAwesomeThing();
print(result);
}