{
  "version": "https://jsonfeed.org/version/1", 
  "title": "Dart", 
  "description": "New language for scalable web app engineering", 
  "home_page_url": "https://www.v2ex.com/go/dart", 
  "feed_url": "https://www.v2ex.com/feed/dart.json", 
  "icon": "https://cdn.v2ex.com/navatar/e945/50c9/742_large.png?m=1385212827", 
  "favicon": "https://cdn.v2ex.com/navatar/e945/50c9/742_normal.png?m=1385212827", 
  "items": [
    {
      "author": {
        "url": "https://www.v2ex.com/member/easylee", 
        "name": "easylee", 
        "avatar": "https://cdn.v2ex.com/avatar/1f3e/75b2/276622_large.png?m=1760345914"
      }, 
      "url": "https://www.v2ex.com/t/1019260", 
      "title": "Dart \u4e2d\u7684\u8fd9\u4e2a\u8bed\u6cd5\u7279\u6027\u662f\u4ec0\u4e48\u65f6\u5019\u63a8\u51fa\u7684\uff1f", 
      "id": "https://www.v2ex.com/t/1019260", 
      "date_published": "2024-02-28T12:43:16+00:00", 
      "content_html": "<p>\u4eca\u65e5 IDEA \u81ea\u52a8\u5e2e\u6211\u66f4\u65b0\u4e86\u4e00\u90e8\u5206 Fat Arrow \u4ee3\u7801\uff0c\u5b98\u7f51\u63cf\u8ff0\uff1a</p>\n<p><a href=\"https://dart.dev/tools/diagnostic-messages?utm_source=dartdev&amp;utm_medium=redir&amp;utm_id=diagcode&amp;utm_content=unnecessary_set_literal#unnecessary_set_literal\" rel=\"nofollow\">https://dart.dev/tools/diagnostic-messages?utm_source=dartdev&amp;utm_medium=redir&amp;utm_id=diagcode&amp;utm_content=unnecessary_set_literal#unnecessary_set_literal</a></p>\n<p>\u5e76\u4e14\u5176\u4e2d\u7684\u9017\u53f7\u4e5f\u66f4\u65b0\u4e3a\u4e86\u5206\u53f7\uff0c\u8bf7\u95ee\u8fd9\u4e2a\u8bed\u6cd5\u7279\u6027\u662f\u4ec0\u4e48\u65f6\u5019\u66f4\u65b0\u7684\uff0c\u68c0\u7d22\u826f\u4e45\u672a\u80fd\u627e\u5230\u6709\u5173\u4fe1\u606f\u3002</p>\n"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/chenhui7373", 
        "name": "chenhui7373", 
        "avatar": "https://cdn.v2ex.com/avatar/d59d/9cee/76124_large.png?m=1489714856"
      }, 
      "url": "https://www.v2ex.com/t/721720", 
      "date_modified": "2020-11-04T06:41:34+00:00", 
      "content_html": "<p>\u00b7\u00b7\u00b7</p>\n<p>import { serve } from \"https://deno.land/std@0.76.0/http/server.ts\";</p>\n<p>const s = serve({ port: 8000 });</p>\n<p>console.log(\"http://localhost:8000/\");</p>\n<p>for await (const req of s) {</p>\n<p>req.respond({ body: \"Hello World\\n\" });</p>\n<p>}</p>\n<p>\u00b7\u00b7\u00b7</p>\n<p>\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7</p>\n<p>import 'dart:io';</p>\n<p>Future main() async {</p>\n<p>var server = await HttpServer.bind(</p>\n<pre><code>InternetAddress.loopbackIPv4,\n\n8000);\n</code></pre>\n<p>print('Listening on localhost:${server.port}');</p>\n<p>await for (HttpRequest request in server) {</p>\n<pre><code>request.response.write('Hello world\\n');\n\nawait request.response.close();\n</code></pre>\n<p>}</p>\n<p>}</p>\n<p>\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7</p>\n", 
      "date_published": "2020-11-04T06:39:13+00:00", 
      "title": "deno \u548c dart \u597d\u50cf\u554a", 
      "id": "https://www.v2ex.com/t/721720"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/chenhui7373", 
        "name": "chenhui7373", 
        "avatar": "https://cdn.v2ex.com/avatar/d59d/9cee/76124_large.png?m=1489714856"
      }, 
      "url": "https://www.v2ex.com/t/665196", 
      "title": "[\u8f6c] Dart \u670d\u52a1\u5668\u7aef\u5f00\u53d1 \u3001 Dart \u5ba2\u6237\u7aef\u5f00\u53d1 \u3001Dart \u6d4f\u89c8\u5668\u7aef\u5f00\u53d1 \u548c Dart \u4e91\u5f00\u53d1", 
      "id": "https://www.v2ex.com/t/665196", 
      "date_published": "2020-04-23T00:45:55+00:00", 
      "content_html": "\u670d\u52a1\u5668\u7aef\u5f00\u53d1<br /><br />Dart-Aqueduct \u6846\u67b6\u5f00\u53d1\uff08\u4e03\uff09<br /><a target=\"_blank\" href=\"https://www.jianshu.com/p/6bc41865d946\" rel=\"nofollow noopener\">https://www.jianshu.com/p/6bc41865d946</a><br /><br />\u540c\u4e00\u7cfb\u5217<br /><a target=\"_blank\" href=\"https://www.jianshu.com/nb/28713449\" rel=\"nofollow noopener\">https://www.jianshu.com/nb/28713449</a><br /><br />++++++++++++++++++++<br /><br />\u5ba2\u6237\u7aef\u5f00\u53d1<br />Flutter \u81ea\u5236\u5de5\u5177\u4e4b fluct \u52a9\u529b Flutter \u5feb\u901f\u5f00\u53d1\u795e\u5668<br /><a target=\"_blank\" href=\"https://www.jianshu.com/nb/26841441\" rel=\"nofollow noopener\">https://www.jianshu.com/nb/26841441</a><br /><br /><br />+++++++++++++++++++++<br />\u6d4f\u89c8\u5668\u7aef\u5f00\u53d1<br /><br />Web \u548c Flutter \u5de5\u7a0b\u5171\u4eab\u4ee3\u7801\u7684\u6b63\u786e\u59ff\u52bf<br /><a target=\"_blank\" href=\"https://zhuanlan.zhihu.com/p/129690348\" rel=\"nofollow noopener\">https://zhuanlan.zhihu.com/p/129690348</a><br /><br /><br />+++++++++++++++++++++<br />\u4e91\u5f00\u53d1<br /><br /><a target=\"_blank\" href=\"http://docs.cloudbase.net/quick-start/flutter.html\" rel=\"nofollow noopener\">http://docs.cloudbase.net/quick-start/flutter.html</a><br /><a target=\"_blank\" href=\"https://firebase.google.cn/\" rel=\"nofollow noopener\">https://firebase.google.cn/</a>"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/cmdOptionKana", 
        "name": "cmdOptionKana", 
        "avatar": "https://cdn.v2ex.com/avatar/07c9/d6c7/439711_large.png?m=1774663400"
      }, 
      "url": "https://www.v2ex.com/t/657404", 
      "title": "\u7528 Dart \u91cd\u5199\u4e86\u4e00\u4e2a\u539f\u672c\u7528 JavaScript \u505a\u7684\u5c0f\u5e94\u7528", 
      "id": "https://www.v2ex.com/t/657404", 
      "date_published": "2020-03-29T17:09:56+00:00", 
      "content_html": "\u5927\u6982 20 \u5929\u524d\u53d1\u5e03\u4e86\u4e00\u4e2a\u5c0f\u5e94\u7528 small-plans ( <a target=\"_blank\" href=\"/t/651056\" rel=\"nofollow noopener\">/t/651056</a> )<br /><br />\u6700\u8fd1\u7528 Dart \u5bf9\u5176\u4e2d\u7684 JavaScript \u4ee3\u7801\u8fdb\u884c\u4e86\u5b8c\u5168\u91cd\u5199\u3002<br /><br />\u603b\u7684\u6765\u8bf4\uff0cDart \u5728\u8fd9\u79cd\u60c5\u666f\u4e0b\u5e76\u6ca1\u6709\u592a\u591a\u4f18\u52bf\u3002<br /><br />- dart:html \u5e93\u4e3a\u4e86\u65b9\u4fbf\u4ece js \u8fc1\u79fb\u8fc7\u6765\uff0c\u51fd\u6570\u8bbe\u8ba1\u5f97\u51e0\u4e4e\u4e0e js \u4e00\u6a21\u4e00\u6837\uff0c\u56e0\u6b64\u7528 Dart \u91cd\u5199 js \u975e\u5e38\u987a\u5229<br />- \u83b7\u5f97\u4e86\u7c7b\u578b\u5b89\u5168\uff0c\u8fd9\u662f\u6700\u5927\u7684\u597d\u5904\uff0c\u4f46\u6ca1\u6709\u5176\u5b83\u597d\u5904\u4e86<br />- Dart \u5904\u7406 json \u6709\u70b9\u9ebb\u70e6<br /><br />\u7531\u4e8e\u6211\u8fd9\u4e2a\u7a0b\u5e8f\u5b9e\u5728\u662f\u975e\u5e38\u5c0f\uff0c\u56e0\u6b64\u4f53\u4f1a\u4e0d\u662f\u5f88\u591a\uff0c\u6700\u5927\u7684\u611f\u53d7\u662f\u51e0\u4e4e\u548c\u5199 js \u4e00\u6837\uff0c\u6ca1\u591a\u5c11\u6b63\u5728\u4f7f\u7528\u4e00\u79cd\u65b0\u8bed\u8a00\u7684\u65b0\u9c9c\u611f\uff08\u6216\u5f02\u6837\u611f)\uff0c\u4e0d\u77e5\u8fd9\u7b97 Dart \u7684\u4f18\u70b9\u8fd8\u662f\u7f3a\u70b9\u3002"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/cmdOptionKana", 
        "name": "cmdOptionKana", 
        "avatar": "https://cdn.v2ex.com/avatar/07c9/d6c7/439711_large.png?m=1774663400"
      }, 
      "url": "https://www.v2ex.com/t/654962", 
      "title": "\u6700\u8fd1\u5b66\u4e60 Dart \u8bed\u8a00\uff0c\u5206\u4eab\u4e00\u4e0b\u5fc3\u5f97 (\u5165\u95e8\u7ea7)", 
      "id": "https://www.v2ex.com/t/654962", 
      "date_published": "2020-03-21T14:42:57+00:00", 
      "content_html": "<p>\u6bcf\u9694\u4e00\u6bb5\u65f6\u95f4\uff0c\u603b\u6709\u4e00\u79cd\u65b0\uff08\u6216\u8f83\u65b0\uff09\u7684\u8bed\u8a00\u8fdb\u5165\u5927\u5bb6\u7684\u89c6\u7ebf\uff0c\u6bd4\u5982 Kotlin, Rust, Go \u7b49\uff0c\u6211\u67e5\u4e86\u4e00\u4e0b\u5b83\u4eec\u7684 \u201c\u51fa\u751f\u65e5\u671f\u201d\uff1a</p>\n<ul>\n<li>Rust (2011 \u81ea\u4e3e, 2015 v1.0)</li>\n<li>Go (2012, v1.0)</li>\n<li>Kotlin (2012 \u5f00\u6e90, 2016 v1.0)</li>\n<li>TypeScript (2014, v1.0)</li>\n<li>Swift (2014, v1.0)</li>\n<li>Dart/Flutter (2018, Dart v2.0)</li>\n</ul>\n<p>\u7531\u4e8e Dart 1 \u5b9e\u8d28\u4e0a\u5df2\u7ecf\u88ab\u653e\u5f03\uff0cDart 2 \u6539\u52a8\u5f88\u5927\u51e0\u4e4e\u5c31\u662f\u4e00\u79cd\u65b0\u7684\u8bed\u8a00\uff0c\u56e0\u6b64\u8fd9\u91cc\u53ea\u5217\u51fa v2.0 \u7684\u65e5\u671f\u3002</p>\n<p>\u4e00\u4e2a\u73b0\u8c61\uff1a\u8fd9\u4e9b\u65b0\u51fa\u7684\u70ed\u95e8\u8bed\u8a00\uff0c\u90fd\u662f\u9759\u6001\u7c7b\u578b\u8bed\u8a00\uff0c\u5176\u539f\u56e0\u53ef\u80fd\u662f\u73b0\u4ee3 IDE \u53d1\u5c55\u8d77\u6765\u4e86\u3002\n\u52a8\u6001\u8bed\u8a00\u6700\u5927\u7684\u4f18\u52bf\u662f \u201c\u5199\u8d77\u6765\u7701\u952e\u76d8\u201d\uff0c\u4f46\u5728\u7c7b\u578b\u63a8\u5bfc\u4e0e\u73b0\u4ee3 IDE \u7684\u52a0\u6301\u4e4b\u4e0b\uff0c\n\u9759\u6001\u8bed\u8a00\u5199\u8d77\u6765\u4e0d\u518d\u7e41\u7410\uff0c\u53cd\u800c\u52a8\u6001\u8bed\u8a00\u7531\u4e8e\u66f4\u96be\u8fdb\u884c\u9759\u6001\u5206\u6790\u800c\u96be\u4ee5\u4eab\u53d7 IDE \u63d0\u4f9b\u7684\u66f4\u591a\u597d\u5904\u3002</p>\n<p>\u8a00\u5f52\u6b63\u4f20\uff0c\u4ece\u4e0a\u9762\u5404\u8bed\u8a00\u7684\u65e5\u671f\u53ef\u89c1\uff0c\u5176\u4e2d Dart 2 \u975e\u5e38\u65b0\uff0c\u8fd9\u4f7f\u5f97\u5b83\u6709\u673a\u4f1a\u5c3d\u60c5\u5438\u6536\u5176\u5b83\u8bed\u8a00\u7684\u7ecf\u9a8c\uff0c\n\u53cd\u6620\u51fa\u73b0\u4ee3\u7f16\u7a0b\u8bed\u8a00\u7684\u5f88\u591a\u65b0\u601d\u60f3\u3002\u4e0b\u9762\u5f00\u59cb\u8bf4\u8bf4 Dart \u8bed\u8a00\u7684\u7279\u70b9\u3002</p>\n<h2>\u4e00\u5207\u7686\u5bf9\u8c61</h2>\n<p>\u751a\u81f3\u8fde\u6570\u5b57\u90fd\u662f\u5bf9\u8c61\uff0c\u6bd4\u5982\u4e0b\u9762\u7684\u4f8b\u5b50\uff0c\u6570\u5b57\u53ef\u76f4\u63a5\u8c03\u7528\u65b9\u6cd5\uff1a</p>\n<pre><code class=\"language-dart\">// int -&gt; String\nString oneAsString = 1.toString();\nassert(oneAsString == '1');\n</code></pre>\n<p>\u7531\u4e8e\u4e00\u5207\u7686\u5bf9\u8c61\uff0c\u6240\u4ee5\u4efb\u4f55\u53d8\u91cf\u7684\u9ed8\u8ba4\u503c\u90fd\u662f null\uff0c\u6bd4\u5982\uff1a</p>\n<pre><code class=\"language-dart\">int n;\nString s;\nassert(n == null);\nassert(s == null);\n</code></pre>\n<h2>\u4ee3\u7801\u5185\u6d4b\u8bd5 (inline testing)</h2>\n<p>\u76f4\u63a5\u5728\u4ee3\u7801\u5185\u5199 <code>assert()</code>, \u8fd9\u4e2a\u51fd\u6570\u53ea\u5728\u5f00\u53d1\u73af\u5883\u4e2d\u6709\u6548\uff0c\u800c\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f1a\u88ab\u5ffd\u7565\uff0c\u975e\u5e38\u9002\u5408\u7528\u6765\u505a\u4e00\u4e9b\u7b80\u5355\u4f46\u91cd\u8981\u7684\u6d4b\u8bd5\u3002</p>\n<h2>\u7c7b\u578b\u63a8\u5bfc</h2>\n<p>\u4ee5\u524d\u7684\u9759\u6001\u7c7b\u578b\u8bed\u8a00\u4e00\u822c\u8981\u6c42\u6bcf\u6b21\u5b9a\u4e49\u53d8\u91cf\u65f6\uff0c\u90fd\u660e\u786e\u5199\u660e\u7c7b\u578b\uff0c\u8fd9\u975e\u5e38\u7e41\u7410\u3002\n\u800c\u73b0\u5728\u81ea\u52a8\u63a8\u5bfc\u53d8\u91cf\u7c7b\u578b\u8fd9\u4e2a\u7279\u6027\u51e0\u4e4e\u6210\u4e3a\u4e86\u5404\u79cd\u65b0\u8bed\u8a00\u7684\u6807\u914d\uff0c\u4e0d\u5c11\u8001\u724c\u8bed\u8a00\u4e5f\u5728\u65b0\u7248\u4e2d\u52a0\u5165\u8fd9\u4e2a\u7279\u6027\u3002</p>\n<pre><code class=\"language-dart\">var s = 'abc';\nassert(s.runtimeType.toString() == 'String');\n</code></pre>\n<h2>\u7b80\u5316\u8bbf\u95ee\u6743\u9650</h2>\n<p>\u4e0d\u901a\u8fc7 public, protected, private \u7b49\u5173\u952e\u8bcd\u6765\u8868\u660e\u6210\u5458\u662f\u5426\u5bf9\u5916\u516c\u5f00\uff0c\u800c\u662f\u901a\u8fc7\u9996\u5b57\u6bcd\u6765\u8868\u793a\u3002\n\u7c7b\u4f3c\u4e8e Golang, Golang \u662f\u7528\u9996\u5b57\u6bcd\u5927\u5199\u8868\u793a public, \u4f46\u8fd9\u88ab\u5f88\u591a\u5f00\u53d1\u8005\u8bdf\u75c5\uff0c\u786e\u5b9e\u4f1a\u5e26\u6765\u4e00\u4e9b\u4e0d\u4fbf\u3002\n\u800c Dart \u5219\u662f\u7528\u9996\u5b57\u6bcd\u4e3a\u4e0b\u5212\u7ebf\u6765\u8868\u793a private, \u8fd9\u5c31\u6bd4 Golang \u90a3\u79cd\u8bbe\u5b9a\u8212\u670d\u591a\u4e86\uff0c\u4e5f\u5f88\u7b26\u5408\u76f4\u89c9\u3002</p>\n<pre><code class=\"language-dart\">// \u8fd9\u4e2a\u4f8b\u5b50\u53ea\u662f\u4e3a\u4e86\u8bf4\u660e\u8bbf\u95ee\u6743\u9650\uff0c\u5e76\u975e\u6700\u4f73\u5b9e\u8df5\u3002\nclass MyClass {\n  int _count;\n  \n  int get count =&gt; _count;\n  set count(value) =&gt; _count = value;\n}\n</code></pre>\n<p>\u662f\u4e0d\u662f\u6709\u70b9\u50cf Python? \u4f46\u4e0e Python \u4e0d\u540c\u7684\u662f\uff0c<code>_count</code> \u4e0d\u662f\u770b\u8d77\u6765\u50cf private, \u800c\u662f\u771f\u7684 private \uff01</p>\n<h2>\u7528\u95ee\u53f7\u8bed\u6cd5\u6765\u7b80\u5316 null \u76f8\u5173\u64cd\u4f5c</h2>\n<p>\u8fd9\u4e5f\u662f\u65b0\u8bed\u8a00\u4e2d\u6bd4\u8f83\u6d41\u884c\u7684\u4e00\u79cd\u7279\u6027\uff0c\u786e\u5b9e\u975e\u5e38\u597d\u7528\u3002</p>\n<pre><code class=\"language-dart\">int n;\n\n// \u6b64\u65f6 n == null, \u53ef\u4ee5\u8d4b\u503c\u3002\nn ??= 3;\nassert(n == 3);\n\n// \u6b64\u65f6 n != null\uff0c\u4fdd\u7559\u539f\u6765\u7684\u503c\u3002\nn ??= 5;\nassert(n == 3);\n\nprint(1 ?? 3); // \u7ed3\u679c\u4e3a 1.\nprint(null ?? 5); // \u7ed3\u679c\u4e3a 5.\n</code></pre>\n<pre><code class=\"language-dart\">myObject?.someProperty\n\n// \u5982\u679c\u6ca1\u6709\u95ee\u53f7\u8bed\u6cd5\uff0c\u5c31\u4f1a\u9ebb\u70e6\u5f88\u591a\uff1a\n(myObject != null) ? myObject.someProperty : null\n</code></pre>\n<p>\u5173\u4e8e null \u6709\u4e00\u4e2a\u6545\u4e8b\uff0c\u4ed6\u7684\u53d1\u660e\u8005\u66fe\u8bf4\u8fd9\u662f\u81ea\u5df1\u72af\u4e0b\u7684 \u201c\u5341\u4ebf\u7f8e\u5143\u9519\u8bef\u201d(billion-dollar mistake)\u3002\n\u4f46\u8fd9\u4e48\u591a\u5e74\u8fc7\u53bb\u4e86\uff0c\u65b0\u8bed\u8a00\u660e\u660e\u6709\u673a\u4f1a\u91c7\u7528 \u201c\u65e0 null\u201d \u8bbe\u8ba1\uff0c\u5374\u8fd8\u662f\u9009\u62e9\u4e86\u6709 null, \u4fa7\u9762\u8bf4\u660e\u8fd9\u4e2a\u53d1\u660e\u8fd8\u662f\u597d\u5904\u591a\u8fc7\u574f\u5904\u3002</p>\n<h2>\u5904\u7406\u5217\u8868\u7684\u5e38\u7528\u51fd\u6570\uff08\u6d41\u5f0f\u5904\u7406\uff09</h2>\n<p>\u6bd4\u5982 filter(\u5728 Dart \u91cc\u662f where), map, any, fold \u7b49\u7b49\uff0c\u4ee5\u524d\u5e38\u89c1\u4e8e\u52a8\u6001\u7c7b\u578b\u8bed\u8a00\uff0c\u4f46\u7531\u4e8e\u8fd9\u4e9b\u51fd\u6570\u786e\u5b9e\u5f88\u65b9\u4fbf\uff0c\n\u73b0\u5728\u5f88\u591a\u9759\u6001\u8bed\u8a00\u91cc\u4e5f\u662f\u6807\u914d\u7279\u6027\u4e86\u3002</p>\n<pre><code class=\"language-dart\">  numbers\n    .where((n) =&gt; n % 2 == 0)\n    .forEach((n) =&gt; print(n));\n</code></pre>\n<h2>\u81ea\u52a8\u63d0\u4f9b getter, setter</h2>\n<p>\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c<code>x</code> \u548c <code>y</code> \u62e5\u6709\u9ed8\u8ba4\u7684 getter \u548c setter\uff0c\u975e\u5e38\u65b9\u4fbf\u3002</p>\n<pre><code class=\"language-dart\">class Point {\n  num x, y;\n  Point(this.x, this.y);\n}\n\nvar p = Point(1.2, 3);\np.y = 2.5;\nprint('${p.x}, ${p.y}'); // \"1.2, 2.5\"\n</code></pre>\n<p>Kotlin \u4e5f\u6709\u7c7b\u4f3c\u7684\u7279\u6027\u3002\u4e3a\u4ec0\u4e48\u5728\u5df2\u7ecf\u6709\u4e86\u90a3\u4e48\u591a\u7f16\u7a0b\u8bed\u8a00\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd8\u8981\u4e0d\u65ad\u53d1\u660e\u65b0\u7684\u8bed\u8a00\u5462\uff0c\n\u539f\u56e0\u4e4b\u4e00\u5c31\u662f\u8fd9\u4e9b\u65b0\u7279\u6027\u975e\u5e38\u4f18\u96c5\uff1a\u5199\u8d77\u6765\u66f4\u65b9\u4fbf\uff0c\u8bfb\u8d77\u6765\u66f4\u6e05\u6670\u3002</p>\n<h2>\u5f02\u6b65\u7f16\u7a0b</h2>\n<ul>\n<li>\n<p>\u636e\u8bf4\u662f\u5fae\u8f6f C# \u6700\u5148\u53d1\u660e\u7684 async/await \u8bed\u6cd5\uff08\u6211\u6ca1\u6709\u67e5\u8bc1\uff09\uff0c\u7528\u8fc7\u90fd\u8bf4\u597d\uff0c\u751a\u81f3\u8fde JavaScript \u548c\nPython \u90fd\u5728\u7248\u672c\u5347\u7ea7\u4e2d\u52a0\u5165\u4e86\u8fd9\u79cd\u8bed\u6cd5\u3002</p>\n</li>\n<li>\n<p>\u5728\u672c\u6587\u5f00\u5934\u5217\u51fa\u7684\u591a\u79cd\u8bed\u8a00\u4e4b\u4e2d\uff0cGo \u7531\u4e8e\u62e5\u6709\u72ec\u7279\u7684 goroutine \u800c\u4e0d\u9700\u8981 async/await, \u53e6\u5916 Swift\n\u867d\u7136\u6682\u65f6\u6ca1\u6709\u8fd9\u79cd\u8bed\u6cd5\uff0c\u4f46\u5f00\u53d1\u8005\u547c\u58f0\u5f88\u9ad8\uff0c\u540e\u7eed\u5927\u6982\u7387\u4f1a\u52a0\u4e0a\uff0c\u5217\u8868\u4e2d\u7684\u5176\u4ed6\u8bed\u8a00\u5168\u90fd\u5df2\u7ecf\u5177\u5907\u8fd9\u79cd\u8bed\u6cd5\u4e86\u3002</p>\n</li>\n</ul>\n<pre><code class=\"language-dart\">Future main() async {\n  var ver = await getVersion();\n  print('In main: version is $ver');\n}\n</code></pre>\n<h2>\u80d6\u7bad\u5934\u51fd\u6570</h2>\n<p>\u5982\u679c\u4f60\u66fe\u7ecf\u4e3b\u8981\u4f7f\u7528 JavaScript, \u540e\u6765\u8f6c\u5230\u522b\u7684\u8bed\u8a00\uff0c\u90a3\u4e48\u4f60\u53ef\u80fd\u4f1a\u5f88\u6000\u5ff5\u90a3\u4e2a\u53ef\u7231\u53c8\u5b9e\u7528\u7684\u80d6\u7bad\u5934\u3002\n\u5728 Dart \u91cc\u4f60\u53ef\u4ee5\u518d\u6b21\u6109\u5feb\u8fc7\u4f7f\u7528\u5b83\u3002</p>\n<pre><code class=\"language-dart\">class MyClass {\n  int value = 0;  \n  void increase() =&gt; value++; \n}\n</code></pre>\n<h2>\u4e32\u8054\u8bed\u6cd5 (Cascade)</h2>\n<p>Dart \u81ea\u79f0\u662f\u4e13\u4e3a\u5ba2\u6237\u7aef\uff08\u7ea6\u7b49\u4e8e\u524d\u7aef\uff09\u800c\u8bbe\u8ba1\u7684\u8bed\u8a00\uff0c\u800c\u8fd9\u4e2a\u65b0\u9896\u3001\u9ad8\u6548\u7684\u4e32\u8054\u8bed\u6cd5\u5f88\u597d\u5730\u4f53\u73b0\u4e86\u4ec0\u4e48\u53eb\u505a\n\u5ba2\u6237\u7aef\u8bed\u8a00\uff0c\u8fd9\u662f Dart \u5e26\u7ed9\u6211\u6700\u5927\u7684\u60ca\u559c\uff01</p>\n<pre><code class=\"language-dart\">querySelector('#confirm')\n  ..text = 'Confirm'\n  ..classes.add('important')\n  ..onClick.listen((e) =&gt; window.alert('Confirmed!'));\n</code></pre>\n<h2>\u603b\u7ed3</h2>\n<p>\u4ee5\u4e0a\u5217\u4e3e\u4e86 Dart \u7684\u4e00\u90e8\u5206\u7279\u6027\uff0c\u53ef\u4ee5\u770b\u51fa\u5b83\u5438\u6536\u4e86\u5f88\u591a\u65b0\u7279\u6027\uff0c\u540c\u65f6\u8003\u8651\u4e86\u522b\u7684\u8bed\u8a00\u7684\u4f7f\u7528\u4e60\u60ef\uff0c\n\u5b66\u8d77\u6765\u4f1a\u6709\u4e00\u79cd\u201c\u4f3c\u66fe\u76f8\u8bc6\u201d\u7684\u719f\u6089\u611f\uff0c\u7528\u8d77\u6765\u4f1a\u6709\u4e00\u79cd\u201c\u8981\u5565\u6709\u5565\u201d\u7684\u723d\u611f\u3002</p>\n<p>\u518d\u7ed3\u5408\u5b83\u7684\u5f3a\u5927\u751f\u547d\u529b\uff1a\u901a\u8fc7 Flutter \u5728\u624b\u673a\u7aef\u751f\u5b58\uff0c\u901a\u8fc7\u7f16\u8bd1\u4e3a\u9ad8\u8d28\u91cf\u7684 JavaScript \u4ee3\u7801\u5728\u7f51\u9875\u7aef\u751f\u5b58\uff0c\n\u901a\u8fc7\u7f16\u8bd1\u4e3a\u4e8c\u8fdb\u5236\u53ef\u6267\u884c\u6587\u4ef6\u5728\u684c\u9762\u7535\u8111\u7aef\u751f\u5b58\uff0c\u540c\u65f6\u4e5f\u5df2\u7ecf\u88ab Google \u5b98\u65b9\u786e\u5b9a\u4e3a Fuchsia \u7684\u4e3b\u8981\u7f16\u7a0b\u8bed\u8a00\u4e4b\u4e00\u3002\n\u56e0\u6b64\uff0c\u6709\u5174\u8da3\u7684\u540c\u5b66\u4e0d\u59a8\u5b66\u4e60\u4e00\u4e0b\u3002</p>\n"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/yech1990", 
        "name": "yech1990", 
        "avatar": "https://cdn.v2ex.com/avatar/bdeb/e2f1/33357_large.png?m=1359567498"
      }, 
      "url": "https://www.v2ex.com/t/651064", 
      "title": "\u4f7f\u7528\u4e86\u4e0b Dart \u8bed\u8a00\uff0c\u53d1\u73b0\u4e00\u4e9b\u7279\u6027\u7684\u8bbe\u8ba1\u5f97\u975e\u5e38\u7f1c\u5bc6\uff0c\u4f8b\u5982 List Comprehension", 
      "id": "https://www.v2ex.com/t/651064", 
      "date_published": "2020-03-08T18:06:44+00:00", 
      "content_html": "<p>\u5c31\u62ff\u5927\u91cf\u4f7f\u7528 List Comprehension \u7684 Python \u505a\u6bd4\u8f83\uff0c</p>\n<ul>\n<li>Dart \u7684\u4e00\u4e2a List Comprehension \u91cc\u9762\u53ef\u4ee5\u5305\u542b\u591a\u4e2a\u201c\u903b\u8f91\u201d</li>\n<li>\u201c\u903b\u8f91\u201d\u7684\u7ed3\u679c\u53ef\u4ee5\u4e3a\u7a7a</li>\n</ul>\n<p>\u8fd9\u4e9b\u7279\u6027 Python \u9700\u8981\u5206\u4e3a\u591a\u4e2a List Comprehension \u4e14\u5916\u5c42\u5d4c\u5957\u903b\u8f91\u6765\u5b9e\u73b0\uff0c\u6bd4\u5982\u4ea7\u751f\u8fd9\u6837\u7684\u4e00\u4e2a List\uff1a</p>\n<p>\uff08 Dart \u7684\u5b9e\u73b0\uff09</p>\n<pre><code class=\"language-dart\">void main() {\n  print([\n    if (2 &gt; 1) 222 else 333,\n    if (2 &gt; 3) 444,\n    for (int i in Iterable.generate(10)) if (i % 3 == 1) i,\n    for (int i in Iterable.generate(10, (x) =&gt; x + 100)) if (i % 2 == 0) i\n  ]);\n}\n</code></pre>\n<p>output: [222, 1, 4, 7, 100, 102, 104, 106, 108]</p>\n<p>https://dartpad.dev/540d15e9a25afb2159ee1b380e98d906</p>\n<p>\uff08 Python \u7684\u5b9e\u73b0\uff09</p>\n<pre><code class=\"language-python\">print(\n    [if (2 &gt; 1) 222 else 333] + \n    ([444] if (2 &gt; 3) else []) +\n    [i for i in range(10) if i % 3 == 1] +\n    [i + 100 for i in range(10) if (i + 100) % 2 == 0]\n)\n</code></pre>\n"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/Cbdy", 
        "name": "Cbdy", 
        "avatar": "https://cdn.v2ex.com/gravatar/91ea1dcad5350d82e02fac3e795dc1f5?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/648498", 
      "date_modified": "2020-02-29T00:04:31+00:00", 
      "content_html": "", 
      "date_published": "2020-02-28T23:59:38+00:00", 
      "title": "js \u8f6c dart \u7f16\u8bd1\u5668\u54ea\u5bb6\u5f3a\uff1f", 
      "id": "https://www.v2ex.com/t/648498"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/chenhui7373", 
        "name": "chenhui7373", 
        "avatar": "https://cdn.v2ex.com/avatar/d59d/9cee/76124_large.png?m=1489714856"
      }, 
      "url": "https://www.v2ex.com/t/646844", 
      "title": "Fuchsia OS \u9884\u8ba1\u8fd8\u6709 75 \u5929\u540e\u53d1\u5e03", 
      "id": "https://www.v2ex.com/t/646844", 
      "date_published": "2020-02-23T08:40:52+00:00", 
      "content_html": "REF\uff1a <a target=\"_blank\" href=\"https://fuchsia-china.com/\" rel=\"nofollow noopener\">https://fuchsia-china.com/</a><br /><br /><br /> [ Pigweed ]  \u6709\u53ef\u80fd\u662f\u7b2c\u4e00\u4e2a\u7248\u672c\u4ee3\u7801\u3002\uff08\u5b89\u5353\u64cd\u4f5c\u7cfb\u7edf\u7528\u7684\u98df\u7269\u4f5c\u4e3a\u4ee3\u53f7\u3002\uff09<br /><br /><br />\u95ee\u9898\u6765\u4e86\uff0cAndroid \u7ffb\u8bd1\u6210\u5b89\u5353\u8fd8\u4e0d\u9519\uff0ciOS \u76f4\u63a5\u770b Logo \u5c31\u53eb\u82f9\u679c\uff0c<br /><br />\u90a3\u4e48 Fuchsia \u5e94\u8be5\u600e\u4e48\u7ffb\u8bd1\u624d\u591f \u4fe1\u8fbe\u96c5\uff1f"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/chenhui7373", 
        "name": "chenhui7373", 
        "avatar": "https://cdn.v2ex.com/avatar/d59d/9cee/76124_large.png?m=1489714856"
      }, 
      "url": "https://www.v2ex.com/t/642389", 
      "date_modified": "2020-02-05T14:17:30+00:00", 
      "content_html": "<p>dart \u6709<a href=\"pub.dartlang.org\" rel=\"nofollow\">pub</a></p>\n<p>dart \u7684\u540e\u7aef\u6846\u67b6</p>\n<ol>\n<li>jaguar\uff0c \u6709 googler \u53c2\u4e0e</li>\n<li>aqueduct\uff0c\u4f01\u4e1a\u7ea7</li>\n<li>angel-dart\uff0c\u559c\u6b22 ror \u7684\u5c0f\u4f19\u5b50\u5f00\u53d1</li>\n</ol>\n<p>btw,</p>\n<p>dart \u7684 UI \u6846\u67b6</p>\n<ol>\n<li>\u6d4f\u89c8\u5668 angular</li>\n<li>\u79fb\u52a8\u7aef flutter</li>\n</ol>\n<p>\u540e\u53f0\u7ba1\u7406 UI\n<a href=\"https://github.com/GeekyAnts/flutter-web-admin-dashbaord\" rel=\"nofollow\">https://github.com/GeekyAnts/flutter-web-admin-dashbaord</a>\n<a href=\"https://github.com/HyperionGray/ng_modular_admin\" rel=\"nofollow\">https://github.com/HyperionGray/ng_modular_admin</a>\n<a href=\"https://github.com/kalismeras61/flutter_web_dashboard\" rel=\"nofollow\">https://github.com/kalismeras61/flutter_web_dashboard</a></p>\n", 
      "date_published": "2020-02-05T14:12:14+00:00", 
      "title": "\u51d1\u70ed\u95f9\uff0c dart \u9002\u5408\u505a\u540e\u53f0\u5417", 
      "id": "https://www.v2ex.com/t/642389"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/ex1gtnim7d", 
        "name": "ex1gtnim7d", 
        "avatar": "https://cdn.v2ex.com/gravatar/fe8954f4768ae6a30f36ec5028c68484?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/641023", 
      "title": "[Flutter/Dart] \u5173\u4e8e dart \u5f02\u6b65\u4efb\u52a1\u6267\u884c\u987a\u5e8f\u7684\u95ee\u9898", 
      "id": "https://www.v2ex.com/t/641023", 
      "date_published": "2020-01-30T09:03:38+00:00", 
      "content_html": "<pre><code class=\"language-dart\">import 'dart:async';\n\nmain() async{\n  print(\"main begin\");\n  a();\n  print(\"main end\");\n}\n\na() async {\n  print(\"a begin\");\n  await b();\n  print(\"a end\");\n}\n\nb() async {\n  print(\"b begin\");\n  await c();\n  print(\"b end\");\n}\n\nFuture c() {\n  return new Future(() {\n    print(\"c\");\n  });\n}\n</code></pre>\n<p>\u4e0a\u9762\u8fd9\u6bb5\u4ee3\u7801\u7684\u8f93\u51fa\u7ed3\u679c\u662f\uff1a<br/>\nmain begin<br/>\na begin<br/>\nb begin<br/>\nmain end<br/>\nc<br/>\nb end<br/>\na end</p>\n<p>main end \u63d0\u524d\u6267\u884c\u4e86\uff0c\u6211\u7684\u7406\u89e3\u662f\uff0c\u5728\u7a0b\u5e8f\u8d70\u5230 b \u51fd\u6570\u91cc\u9762\u65f6\uff0c\u4e00\u76f4\u662f\u5728\u5f53\u524d\u7ebf\u7a0b\u7684\uff0c\u7136\u540e\u9047\u5230 await \u8bed\u53e5\uff0c\u7b49\u5f85 c \u51fd\u6570\u6267\u884c\u5b8c\u6210\uff0c\u6240\u4ee5\u5e94\u8be5\u662f c \u51fd\u6570\u6267\u884c\u5b8c\u518d\u7ee7\u7eed\u8fdb\u884c\u4e0b\u53bb\uff0c\u8bf7\u95ee\u8fd9\u6837\u7406\u89e3\u6709\u95ee\u9898\u5417\uff1f</p>\n"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/chenhui7373", 
        "name": "chenhui7373", 
        "avatar": "https://cdn.v2ex.com/avatar/d59d/9cee/76124_large.png?m=1489714856"
      }, 
      "url": "https://www.v2ex.com/t/640980", 
      "title": "Flutter \u8d44\u6599\u5206\u4eab", 
      "id": "https://www.v2ex.com/t/640980", 
      "date_published": "2020-01-30T06:19:15+00:00", 
      "content_html": "\u56fd\u4ea7\uff1f\u5f00\u6e90\u9879\u76ee<br />https://flutterchina.club/opensource.html<br /><a target=\"_blank\" href=\"https://github.com/OpenFlutter\" rel=\"nofollow noopener\">https://github.com/OpenFlutter</a><br /><a target=\"_blank\" href=\"https://github.com/alibaba-flutter\" rel=\"nofollow noopener\">https://github.com/alibaba-flutter</a><br /><br />\u5728\u7ebf\u5e03\u5c40<br />https://flutterstudio.app/<br /><br />\u5d4c\u5165\u52a8\u753b\uff1f<br />https://rive.app/explore/popular/trending/all<br /><br /><br />Dart/Flutter \u8d44\u6599\u7cbe\u9009\u4e2d\u6587\u7248<br /><a target=\"_blank\" href=\"https://github.com/chai2010/awesome-dart-zh\" rel=\"nofollow noopener\">https://github.com/chai2010/awesome-dart-zh</a><br /><br /><br />Flutter \u63d0\u5347\u5f00\u53d1\u6548\u7387\u7684\u4e00\u4e9b\u65b9\u6cd5\u548c\u5de5\u5177<br /><a target=\"_blank\" href=\"https://github.com/LXD312569496/flutter-learing/blob/master/lazy_method.md\" rel=\"nofollow noopener\">https://github.com/LXD312569496/flutter-learing/blob/master/lazy_method.md</a><br /><br /><br />\u65e9\u671f\u63a5\u89e6 Flutter \u5f00\u53d1\u8005<br /><a target=\"_blank\" href=\"https://blog.csdn.net/hekaiyou?t=1\" rel=\"nofollow noopener\">https://blog.csdn.net/hekaiyou?t=1</a>"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/MiYogurt", 
        "name": "MiYogurt", 
        "avatar": "https://cdn.v2ex.com/gravatar/deee99728b33f400de8b6263916f7b81?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/569146", 
      "date_modified": "2019-05-30T07:47:13+00:00", 
      "content_html": "<p>\u57fa\u672c\u5199\u7684\u5dee\u4e0d\u591a\u4e86\uff0c\u8fd8\u5dee\u4e00\u4e9b\u57fa\u7840\u5185\u5bb9\uff0c\u76ee\u524d\u6b63\u5728\u5199 ffi\u3002</p>\n<p>\u5047\u5982\u6709\u4eba\u5408\u4f5c\u7684\u8bdd\uff0c\u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e9b flutter webrtc \u7684\u5185\u5bb9\uff0c\u4ee5\u53ca flutter desktop\u3001web \u7684\u5185\u5bb9\uff0c\u4f7f\u4e66\u7c4d\u66f4\u52a0\u4e30\u5bcc\u4e0e\u6743\u5a01\u3002</p>\n<p>\u76ee\u5f55\u5728 <a href=\"https://github.com/MiYogurt/DartUp\" rel=\"nofollow\">https://github.com/MiYogurt/DartUp</a></p>\n", 
      "date_published": "2019-05-30T07:41:01+00:00", 
      "title": "\u6709\u6ca1\u6709 Dart \u7684\u5927\u4f6c\u60f3\u8981\u5199\u4e66\u7684\uff0c\u5408\u4f5c\u5417\uff1f", 
      "id": "https://www.v2ex.com/t/569146"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/chai2010", 
        "name": "chai2010", 
        "avatar": "https://cdn.v2ex.com/avatar/98c6/e555/77612_large.png?m=1691797131"
      }, 
      "url": "https://www.v2ex.com/t/514460", 
      "title": "Dart/Flutter \u8d44\u6599\u7cbe\u9009", 
      "id": "https://www.v2ex.com/t/514460", 
      "date_published": "2018-12-05T02:57:35+00:00", 
      "content_html": "<p><a href=\"https://github.com/chai2010/awesome-dart-zh\" rel=\"nofollow\">https://github.com/chai2010/awesome-dart-zh</a></p>\n<p>\u6b22\u8fce\u5173\u6ce8</p>\n"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/chenhui7373", 
        "name": "chenhui7373", 
        "avatar": "https://cdn.v2ex.com/avatar/d59d/9cee/76124_large.png?m=1489714856"
      }, 
      "url": "https://www.v2ex.com/t/439647", 
      "date_modified": "2018-03-20T03:15:07+00:00", 
      "content_html": "\u80cc\u666f\u662f facebook \u62a2\u4e86\u8c37\u6b4c\u5f88\u591a\u5e7f\u544a\u3002\r<br />\r<br /><a target=\"_blank\" href=\"http://www.infoq.com/cn/articles/why-flutter-uses-dart\" rel=\"nofollow\">http://www.infoq.com/cn/articles/why-flutter-uses-dart</a>\r<br />\r<br />\u5145\u5206\u8bf4\u660e\u4e86\uff0c\u7a97\u53e3\u7a0b\u5e8f\u6ca1\u529e\u6cd5\u8fd8\u662f\u8981 class\uff0c\u867d\u7136 alan kay \u540e\u6094\u53d1\u660e\u4e86 object\u3002", 
      "date_published": "2018-03-20T03:13:36+00:00", 
      "title": "[\u8f6c] \u4e3a\u4ec0\u4e48 Flutter \u4f1a\u9009\u62e9 Dart \uff1f", 
      "id": "https://www.v2ex.com/t/439647"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/chenhui7373", 
        "name": "chenhui7373", 
        "avatar": "https://cdn.v2ex.com/avatar/d59d/9cee/76124_large.png?m=1489714856"
      }, 
      "url": "https://www.v2ex.com/t/397895", 
      "title": "Dart \u5728 fuchsia os \u4e0a\u7684\u5e94\u7528", 
      "id": "https://www.v2ex.com/t/397895", 
      "date_published": "2017-10-16T00:52:50+00:00", 
      "content_html": "<a target=\"_blank\" href=\"https://github.com/fuchsia-mirror?language=dart\" rel=\"nofollow\">https://github.com/fuchsia-mirror?language=dart</a>\r<br />\r<br />\u4e3b\u8981\u7528\u6765\u5f00\u53d1 fuchsia os \u4e0a\u7684 APP \u4e86\uff0c\r<br />\r<br />\u672a\u6765 5g \u65f6\u4ee3\uff0c\u80fd\u5426\u8fce\u6765\u771f webos"
    }
  ]
}