doc: update docs/flutter.md #830 ade6fbe3d0

This commit is contained in:
jaywcjlove
2024-09-24 07:02:37 +00:00
parent 037ee1346d
commit 0859c5b67d
182 changed files with 1092 additions and 1117 deletions

View File

@ -4,14 +4,14 @@
<meta charset="utf-8">
<title>Lua 备忘清单
&#x26; lua cheatsheet &#x26; Quick Reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta description="包含最重要概念、函数、方法等的 Lua 备忘单。 初学者的完整快速参考。
入门,为开发人员分享快速参考备忘单。">
<meta keywords="lua,reference,Quick,Reference,cheatsheet,cheat,sheet">
<link rel="icon" href="data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%221em%22%20width%3D%221em%22%3E%20%3Cpath%20d%3D%22m21.66%2010.44-.98%204.18c-.84%203.61-2.5%205.07-5.62%204.77-.5-.04-1.04-.13-1.62-.27l-1.68-.4c-4.17-.99-5.46-3.05-4.48-7.23l.98-4.19c.2-.85.44-1.59.74-2.2%201.17-2.42%203.16-3.07%206.5-2.28l1.67.39c4.19.98%205.47%203.05%204.49%207.23Z%22%20fill%3D%22%23c9d1d9%22%2F%3E%20%3Cpath%20d%3D%22M15.06%2019.39c-.62.42-1.4.77-2.35%201.08l-1.58.52c-3.97%201.28-6.06.21-7.35-3.76L2.5%2013.28c-1.28-3.97-.22-6.07%203.75-7.35l1.58-.52c.41-.13.8-.24%201.17-.31-.3.61-.54%201.35-.74%202.2l-.98%204.19c-.98%204.18.31%206.24%204.48%207.23l1.68.4c.58.14%201.12.23%201.62.27Zm2.43-8.88c-.06%200-.12-.01-.19-.02l-4.85-1.23a.75.75%200%200%201%20.37-1.45l4.85%201.23a.748.748%200%200%201-.18%201.47Z%22%20fill%3D%22%23228e6c%22%20%2F%3E%20%3Cpath%20d%3D%22M14.56%2013.89c-.06%200-.12-.01-.19-.02l-2.91-.74a.75.75%200%200%201%20.37-1.45l2.91.74c.4.1.64.51.54.91-.08.34-.38.56-.72.56Z%22%20fill%3D%22%23228e6c%22%20%2F%3E%20%3C%2Fsvg%3E" type="image/svg+xml">
<link rel="stylesheet" href="../style/style.css">
<link rel="stylesheet" href="../style/katex.css">
<link href="../style/style.css" rel="stylesheet">
<link href="../style/katex.css" rel="stylesheet">
</head>
<body><nav class="header-nav"><div class="max-container"><a href="../index.html" class="logo"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em">
<path d="m21.66 10.44-.98 4.18c-.84 3.61-2.5 5.07-5.62 4.77-.5-.04-1.04-.13-1.62-.27l-1.68-.4c-4.17-.99-5.46-3.05-4.48-7.23l.98-4.19c.2-.85.44-1.59.74-2.2 1.17-2.42 3.16-3.07 6.5-2.28l1.67.39c4.19.98 5.47 3.05 4.49 7.23Z" fill="#c9d1d9"></path>
@ -26,7 +26,7 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" class="dark" height="1em" width="1em">
<path d="M12 11.807A9.002 9.002 0 0 1 10.049 2a9.942 9.942 0 0 0-5.12 2.735c-3.905 3.905-3.905 10.237 0 14.142 3.906 3.906 10.237 3.905 14.143 0a9.946 9.946 0 0 0 2.735-5.119A9.003 9.003 0 0 1 12 11.807z"></path>
</svg>
</button><script src="../js/dark.js?v=1.5.5"></script><a href="https://github.com/jaywcjlove/reference" class="" target="__blank"><svg viewBox="0 0 16 16" fill="currentColor" height="1em" width="1em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a></div></div></nav><div class="wrap h1body-exist max-container"><header class="wrap-header h1wrap"><h1 id="lua-备忘清单"><svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 32 32" height="1em" width="1em">
</button><script src="../js/dark.js?v=1.5.6"></script><a href="https://github.com/jaywcjlove/reference" class="" target="__blank"><svg viewBox="0 0 16 16" fill="currentColor" height="1em" width="1em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a></div></div></nav><div class="wrap h1body-exist max-container"><header class="wrap-header h1wrap"><h1 id="lua-备忘清单"><svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 32 32" height="1em" width="1em">
<path d="m.505 13.839-.36-.052c-.067.459-.109.927-.135 1.391l.364.02c.027-.452.068-.911.131-1.359zm5.011-9.454-.245-.271c-.344.307-.683.635-.995.973l.265.256c.313-.333.636-.656.975-.959zm2.177-1.64-.199-.313c-.391.251-.781.516-1.145.792l.219.292a14.89 14.89 0 0 1 1.125-.771zM2.432 24.489c.245.396.511.781.792 1.151l.292-.219a15.077 15.077 0 0 1-.771-1.124zm-.927-2.62-.344.141c.172.421.365.844.579 1.255l.005.016.328-.167-.011-.016a15.065 15.065 0 0 1-.557-1.229zM.396 12.412l.359.083c.105-.443.224-.885.365-1.312l-.349-.115a15.9 15.9 0 0 0-.375 1.344zm-.032 4.151L0 16.574c.016.463.052.932.109 1.391l.364-.043a14.992 14.992 0 0 1-.109-1.359zm-.02 2.781c.093.453.213.907.349 1.349l.348-.105c-.129-.437-.244-.88-.344-1.323zM15.432.364 15.416 0c-.463.016-.932.052-1.389.109l.047.364c.448-.057.905-.093 1.359-.109zm15.532 11.057c.129.433.244.881.339 1.324l.359-.079a14.795 14.795 0 0 0-.349-1.355zm-7.469-9.566a15.542 15.542 0 0 0-1.26-.6l-.147.333c.423.177.833.376 1.235.589zM20.921.76a17.402 17.402 0 0 0-1.343-.364l-.084.353c.443.105.885.224 1.317.365zM8.901 2.063c.396-.203.807-.391 1.219-.557l-.141-.344a15.88 15.88 0 0 0-1.244.573l-.021.011.167.328zm22.735 13.39.369-.016a21.153 21.153 0 0 0-.109-1.396l-.365.047c.053.448.089.907.105 1.365zM18.203.14a15.693 15.693 0 0 0-1.391-.129l-.015.364c.453.021.911.068 1.359.131zm-5.479.563-.079-.359c-.452.093-.905.213-1.348.349l.109.348c.432-.129.875-.244 1.317-.339zM2.563 7.292l.307.197c.245-.375.511-.749.787-1.109l-.287-.229c-.287.371-.557.756-.807 1.141zM1.255 9.755l.339.147c.177-.417.376-.833.589-1.235l-.328-.172c-.215.412-.417.833-.6 1.26zm23.042 19.5.192.313c.396-.245.781-.511 1.151-.792l-.219-.292c-.359.271-.739.537-1.124.771zm4.031-3.63.292.229c.287-.365.557-.751.807-1.141l-.301-.197c-.251.38-.516.749-.797 1.109zm-1.855 1.995.245.271c.344-.307.683-.64.995-.973l-.265-.256c-.308.333-.641.651-.975.959zm3.339-4.281.324.172c.219-.412.421-.833.599-1.26l-.339-.141c-.177.417-.369.828-.584 1.229zm1.677-5.167.365.052c.063-.464.109-.927.135-1.391l-.364-.021c-.027.453-.073.912-.136 1.36zm-.614 2.656.355.115c.14-.443.265-.896.369-1.349l-.359-.083c-.1.448-.224.891-.365 1.317zm-.938-11.932c.203.407.396.823.568 1.244l.339-.14c-.172-.427-.371-.86-.584-1.271zM11.063 31.224c.443.14.891.265 1.344.369l.083-.353a15.487 15.487 0 0 1-1.312-.365zm2.718.631c.459.063.927.109 1.391.135l.016-.369a15.064 15.064 0 0 1-1.36-.131zm9.318-1.923c-.401.204-.812.396-1.235.563l.141.344c.421-.177.855-.365 1.26-.579l.005-.005-.161-.328zM6.151 28.625c.365.281.751.557 1.141.801l.197-.301c-.38-.251-.755-.516-1.115-.792zm10.406 3.011.011.364c.463-.021.932-.052 1.396-.115l-.047-.359c-.448.057-.907.093-1.36.109zM8.495 30.14c.407.215.833.417 1.26.6l.141-.339a17.761 17.761 0 0 1-1.229-.589zm-4.386-3.421c.312.349.64.683.979.995l.251-.265a15.397 15.397 0 0 1-.953-.975zm15.151 4.584.079.359c.453-.099.907-.219 1.355-.355l-.109-.348a21.46 21.46 0 0 1-1.324.344zM28.24.172a3.583 3.583 0 0 0-3.584 3.583 3.584 3.584 0 0 0 3.584 3.589c4.781 0 4.781-7.172 0-7.172zm-7.808 20.421c0 .631.417.88 1.136.88.896 0 1.729-.525 1.729-1.353v-.86c-.308.147-.505.188-1.475.324-.979.145-1.391.405-1.391 1.009zM16 3.755c-6.76 0-12.24 5.48-12.24 12.24S9.24 28.24 16 28.24s12.24-5.485 12.24-12.245c0-6.755-5.48-12.24-12.24-12.24zM12.683 22.12H7.694v-8.032h1.025v7.125h3.969v.907zm5.51 0h-.829v-.896c-.541.76-1.077 1.057-1.927 1.057-1.125 0-1.839-.62-1.839-1.579v-4.359h.912v4c0 .692.463 1.135 1.192 1.135.959 0 1.573-.771 1.573-1.948v-3.187h.917zm-.709-11.193a3.583 3.583 0 1 1 7.166 0 3.583 3.583 0 0 1-7.166 0zm7.423 10.474v.692c-.297.079-.437.1-.625.1a.976.976 0 0 1-.953-.761 2.695 2.695 0 0 1-1.959.849c-1.172 0-1.896-.615-1.896-1.661 0-.703.339-1.224 1.011-1.5.36-.141.552-.188 1.855-.349.729-.088.959-.255.959-.64v-.245c0-.547-.464-.859-1.287-.859-.865 0-1.276.323-1.36 1.025h-.921c.057-1.333.916-1.869 2.312-1.869 1.423 0 2.167.547 2.167 1.572v3.219c0 .287.177.448.5.448.052 0 .099 0 .199-.02z"></path>
</svg>
<a aria-hidden="true" tabindex="-1" href="#lua-备忘清单"><span class="icon icon-link"></span></a>Lua 备忘清单</h1><div class="wrap-body">
@ -85,7 +85,7 @@
</span><span class="code-line"><span class="token comment">-- 使用 ""</span>
</span><span class="code-line"><span class="token keyword">local</span> str2 <span class="token operator">=</span> <span class="token string">"str2"</span>
</span></code></pre>
<h4 id=""><a aria-hidden="true" tabindex="-1" href="#"><span class="icon icon-link"></span></a><code>[[]]</code></h4>
<h4 id=""><code>[[]]</code></h4>
<p>使用 <code>[[]]</code> 跨行表示多个字符串</p>
<pre class="language-lua"><code class="language-lua code-highlight"><span class="code-line"><span class="token keyword">local</span> html <span class="token operator">=</span> <span class="token string">[[
</span></span><span class="code-line"><span class="token string">&#x3C;html>
@ -826,7 +826,7 @@
<li><a href="https://wiki.luatos.com/luaGuide/introduction.html">luatos</a> <em>(wiki.luatos.com)</em></li>
<li><a href="https://www.twle.cn/l/yufei/lua53/lua-basic-index.html">Lua 教程</a> <em>(twle.cn)</em></li>
</ul>
</div></div><div class="h2wrap-body"></div></div></div><script src="https://giscus.app/client.js" data-repo="jaywcjlove/reference" data-repo-id="R_kgDOID2-Mw" data-category="Q&#x26;A" data-category-id="DIC_kwDOID2-M84CS5wo" data-mapping="pathname" data-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom" data-theme="dark" data-lang="zh-CN" crossorigin="anonymous" async></script><div class="giscus"></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>.</footer></footer><script src="../data.js?v=1.5.5" defer></script><script src="../js/fuse.min.js?v=1.5.5" defer></script><script src="../js/main.js?v=1.5.5" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
</div></div><div class="h2wrap-body"></div></div></div><script src="https://giscus.app/client.js" data-repo="jaywcjlove/reference" data-repo-id="R_kgDOID2-Mw" data-category="Q&#x26;A" data-category-id="DIC_kwDOID2-M84CS5wo" data-mapping="pathname" data-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom" data-theme="dark" data-lang="zh-CN" crossorigin="anonymous" async></script><div class="giscus"></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>.</footer></footer><script src="../data.js?v=1.5.6" defer></script><script src="../js/fuse.min.js?v=1.5.6" defer></script><script src="../js/main.js?v=1.5.6" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
</html>