上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 86 下一页
摘要: 阅读全文
posted @ 2020-09-23 13:52 富坚老贼 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-09-23 10:29 富坚老贼 阅读(107) 评论(0) 推荐(0) 编辑
摘要: https://api.dart.dev/stable/2.9.3/dart-mirrors/dart-mirrors-library.html 阅读全文
posted @ 2020-09-23 10:19 富坚老贼 阅读(625) 评论(0) 推荐(0) 编辑
摘要: 隔离并发,不共享内存,使用消息进程通信 import 'dart:isolate'; 阅读全文
posted @ 2020-09-23 10:12 富坚老贼 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 目前Typedefs只能赋值函数,未来可能有其他类型 //定义一个别名 typedef Fu = int Function(int a, int b); class A { //生命一个别名类型 Fu f; A(this.f); } main(List<String> args) { //传一个函数 阅读全文
posted @ 2020-09-23 10:03 富坚老贼 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 相当于java里的注解,C#里的特性, Metadate library todo; class Todo { final String who; final String what; const Todo(this.who, this.what); } @Todo('seth', 'make th 阅读全文
posted @ 2020-09-22 15:49 富坚老贼 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 导入库 导入内置库 import 'dart:html'; 拆分成多个库 a.dart part of "./sum.dart"; class A { static int a = 10; } b.dart part of "./sum.dart"; class B { static int b = 阅读全文
posted @ 2020-09-21 16:25 富坚老贼 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 1.命名 对同一个事物使用相同的名称表示 除非缩写比未缩写的术语更加普遍,否则不要用缩写 优先把描述性强的词语方法最后 pageCount buildRectangles IOStream HttpRequest 考虑把代码读取来像句子一样流畅 // "If errors is empty..." 阅读全文
posted @ 2020-09-21 15:43 富坚老贼 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 一、dart风格 1.大小写 UpperCamelCase 每个单词首字母大写 lowerCamelCase 第一个单词的首字母小写 lowercase_with_underscores 全部小写,字母使用下划线分割 (1)类、枚举类型、typedef和类型参数应使用 UpperCamelCase 阅读全文
posted @ 2020-09-21 15:14 富坚老贼 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1.库 在 part of 后要使用相对路径的字符串,不要直接使用库名称 part "some/other/file.dart";//好 part of my_library;//坏 导入自己的lib库时要使用相对路径 import 'src/utils.dart'; //好 import 'pac 阅读全文
posted @ 2020-09-18 09:09 富坚老贼 阅读(165) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 86 下一页