layout: post title: “2019-12-13-dart总结.markdown” date: 2019-12-13 12:11:30 +0800

  1. 一种面向客户端的语言,可以运行于网页和客户端

最新版本2.7加入了extension功能,增加了特殊字符支持,提升空指针安全检查

  1. 关键知识点

构造函数

class Folder {
  final String name;
  Folder(this.name);
  Folder.temp() : name = 'temporary';
  Folder.temp2() : this("temporary2");
}
  1. FutureOr

/// The FutureOr<int> type is actually the “type union” of the types int and /// Future<int>.