基础库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

application.dart 350 B

4 vuotta sitten
123456789101112131415161718
  1. typedef Future InitMethod();
  2. class Application {
  3. // 初始化方法
  4. static List<InitMethod> _initMethods = List();
  5. static Future init() async {
  6. for (InitMethod method in _initMethods) {
  7. await method();
  8. }
  9. return Future.delayed(Duration.zero);
  10. }
  11. static addMethod(InitMethod method) {
  12. _initMethods.add(method);
  13. }
  14. }