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
void main(){ | |
performTasks(); | |
} | |
void performTasks () async{ | |
task1(); | |
String task2Result= await task2(); | |
task3(task2Result); | |
} |
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
/// Dart is a lexically scoped language, which means that the scope of variables is determined statically, simply by the layout of the code. You can “follow the curly braces outwards” to see if a variable is in scope. | |
// example | |
bool topLevel = true; | |
void main() { // | |
var insideMain = true; | |
void myFunction() { | |
var insideFunction = true; | |
void nestedFunction() { | |
var insideNestedFunction = true; |
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
mixin IModel { | |
int get field1; | |
} | |
mixin IWidget<Model extends IModel> { | |
/// | |
Model get model; | |
} | |
mixin IState<W extends IWidget<M>, M extends IModel> { |