Page 36 - Dart Language
P. 36
import 'package:deferred/hello.dart' deferred as hello;
When you need the library, invoke loadLibrary() using the library’s identifier.
greet() async {
await hello.loadLibrary();
hello.printGreeting();
}
In the preceding code, the await keyword pauses execution until the library is loaded. For more
information about async and await, see more examples here asynchrony support or visit the
asynchrony support part of the language tour.
Read Libraries online: https://riptutorial.com/dart/topic/3332/libraries
https://riptutorial.com/ 31

