-
-
Save itsatifsiddiqui/7134675c97b32a2eac833e6474ad13d2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
Future<void> asyncFunction() async { | |
print('a'); | |
await Future.value(); | |
print('b'); | |
} | |
Stream<void> asyncGenerator() async* { | |
print('c'); | |
} | |
void main() { | |
runApp(Container()); | |
asyncFunction(); | |
asyncGenerator().listen((_) {}); | |
WidgetsBinding.instance.addPostFrameCallback((_) => print('d')); | |
Future(() => print('e')); | |
Future(() {}).then((_) => print('f')); | |
Future.sync(() => print('g')); | |
Future.sync(() {}).then((_) => print('h')); | |
Future.value().then((_) => print('i')); | |
Future.microtask(() => print('j')); | |
Future.microtask(() {}).then((_) => print('k')); | |
WidgetsBinding.instance.addPostFrameCallback((_) => print('l')); | |
print('m'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment