{"id":177377,"date":"2020-10-27T21:39:12","date_gmt":"2020-10-27T13:39:12","guid":{"rendered":"http:\/\/4563.org\/?p=177377"},"modified":"2020-10-27T21:39:12","modified_gmt":"2020-10-27T13:39:12","slug":"flutter-math-%e4%bd%bf%e7%94%a8%e7%ba%af-flutter-%e6%b8%b2%e6%9f%93-latex-%e6%95%b0%e5%ad%a6%e5%85%ac%e5%bc%8f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=177377","title":{"rendered":"Flutter Math: \u4f7f\u7528\u7eaf Flutter \u6e32\u67d3 LaTeX \u6570\u5b66\u516c\u5f0f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Flutter Math: \u4f7f\u7528\u7eaf Flutter \u6e32\u67d3 LaTeX \u6570\u5b66\u516c\u5f0f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : znjw <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u4ecb\u7ecd\u4e00\u4e0b\u6211\u5f00\u53d1\u7684\u4e00\u4e2a Flutter \u63d2\u4ef6\uff1aFlutter Math\uff0c\u6700\u8fd1\u521a\u521a\u53d1\u5e03\u4e86 0.2.0 \u7248\u3002Flutter Math \u662f\u4e00\u4e2a\u5b8c\u5168\u4f7f\u7528 Dart \u548c Flutter \u6e32\u67d3 LaTeX \u6570\u5b66\u516c\u5f0f\u7684\u63d2\u4ef6\uff0c\u53ef\u4ee5\u770b\u4f5c\u662f\u79fb\u690d\u5728 Dart \u548c Flutter \u5e73\u53f0\u4e0a\u7684 KaTeX \u3002\u5176\u652f\u6301\u7684 LaTeX \u8bed\u6cd5\u5927\u81f4\u4e0e KaTeX \u76f8\u540c\uff08\u5c11\u6570\u5f53\u524d\u7248\u672c\u6682\u4e0d\u652f\u6301\u7684\u8bed\u6cd5\u8be6\u89c1 Github \u4ed3\u5e93\uff09\uff0c\u5bf9\u6570\u5b66\u516c\u5f0f\u7684\u6e32\u67d3\u7ed3\u679c\u51e0\u4e4e\u50cf\u7d20\u7ea7\u8fd8\u539f KaTeX \u3002<\/p>\n<p>\u76f8\u6bd4\u5df2\u6709\u7684 flutter_tex \u63d2\u4ef6\uff0c\u672c\u63d2\u4ef6\u5b8c\u5168\u7684\u57fa\u4e8e Dart \u548c Flutter\uff0c\u4e0d\u5305\u542b\u4efb\u4f55 WebView \u548c Javascript\uff0c\u6027\u80fd\u8fdc\u8d85\u8fc7 flutter_tex \u3002\u5927\u5bb6\u5982\u679c\u9891\u7e41\u9047\u5230 flutter_tex \u5e26\u6765\u7684\u5361\u987f\u4ee5\u53ca\u5d29\u6e83\uff0c\u6b22\u8fce\u8bd5\u7528 Flutter Math \u3002\u6240\u6709\u7684\u7ec4\u4ef6\u90fd\u540c\u65f6\u652f\u6301\u624b\u673a\u7aef\u548c Web \u7aef[^1],[^2]\u3002\u53ef\u4ee5\u5728\u6b64\u67e5\u770b Web \u7aef\u6548\u679c Flutter Math Demo<\/p>\n<h2>\u6e32\u67d3\u6837\u4f8b<\/h2>\n<p><code>x = frac{-b pm sqrt{b^2 - 4ac}}{2a}<\/code><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/10\/20201029_5f9ae14918e02.png\" alt=\"Flutter Math: \u4f7f\u7528\u7eaf Flutter \u6e32\u67d3 LaTeX \u6570\u5b66\u516c\u5f0f\" \/><\/p>\n<p><code>ihbarfrac{partial}{partial t}Psi(vec x,t) = -frac{hbar}{2m}nabla^2Psi(vec x,t)+ V(vec x)Psi(vec x,t)<\/code><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/10\/20201029_5f9ae14dacbb2.png\" alt=\"Flutter Math: \u4f7f\u7528\u7eaf Flutter \u6e32\u67d3 LaTeX \u6570\u5b66\u516c\u5f0f\" \/><\/p>\n<p><code>hat f(xi) = int_{-infty}^infty f(x)e^{- 2pi i xi x}mathrm{d}x<\/code><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/10\/20201029_5f9ae15289ee3.png\" alt=\"Flutter Math: \u4f7f\u7528\u7eaf Flutter \u6e32\u67d3 LaTeX \u6570\u5b66\u516c\u5f0f\" \/><\/p>\n<h2>\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<ol>\n<li>\u5728 pubspec.yaml \u6587\u4ef6\u4e2d\u6dfb\u52a0\u5bf9<code>flutter_math<\/code>\u7684\u4f9d\u8d56<\/li>\n<li>\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528<code>Math.tex(expression)<\/code>\u7ec4\u4ef6\u5c55\u793a\u6e32\u67d3\u7ed3\u679c\u3002\u53ef\u4ee5\u901a\u8fc7\u63d0\u4f9b\u53ef\u9009\u53c2\u6570<code>mathStyle<\/code>\u548c<code>textStyle<\/code>\u63a7\u5236\u516c\u5f0f\u6837\u5f0f\uff0c<code>onErrorFallback<\/code>\u81ea\u5b9a\u4e49\u8f93\u5165\u9519\u8bef\u65f6\u5982\u4f55\u5c55\u793a\u62a5\u9519\u4fe1\u606f\u3002\u6837\u4f8b\u5982\u4e0b\n<pre><code>Math.tex(   r'frac a b',   mathStyle: MathStyle.text, \/\/ \u884c\u5185\u516c\u5f0f   textStyle: TextStyle(fontSize: 42), ) <\/code><\/pre>\n<\/li>\n<\/ol>\n<p>0.2.0 \u7248\u672c\u65b0\u52a0\u5165\u53ef\u9009\u62e9\u7248\u672c<code>SelectableMath<\/code>\uff0c\u57fa\u672c\u4e0e Flutter \u81ea\u5e26\u7684<code>SelectableText<\/code>\u6548\u679c\u76f8\u540c\u3002<\/p>\n<p>\u9879\u76ee\u4ed3\u5e93\u5730\u5740\uff1aGitHub \u5730\u5740\u3002\u76ee\u524d\u7248\u672c\u4e3a 0.1.4\uff0c\u66f4\u591a\u4fe1\u606f\u4ee5\u53ca\u6682\u4e0d\u652f\u6301\u7684 KaTeX \u7279\u6027\u6b22\u8fce\u67e5\u9605 GitHub \u9875\u9762\u3002\u6b22\u8fce\u6253\u661f\uff0c\u6b22\u8fce fork \uff01<\/p>\n<p>[^1]: Web \u7aef debug \u53ef\u80fd\u4f1a\u51fa\u73b0\u6808\u6ea2\u51fa\u9519\u8bef\uff0c\u8fd9\u662f\u4e00\u4e2a\u5df2\u77e5 Dart \u7f16\u8bd1\u5668 bug \u5e76\u4e14\u77ed\u671f\u5185 stable\/beta \u901a\u9053\u4fee\u590d\u53ef\u80fd\u6027\u8f83\u5c0f\u3002\u8bf7\u5347\u7ea7\u5230\u5e26\u6709 Dart2.11.0-254.0.dev \u6216\u66f4\u9ad8\u7248\u672c\u7684 Flutter \u3002<\/p>\n<p>[^2]: Web \u7aef\u90e8\u5206\u7b26\u53f7\u53f3\u4fa7\u6e32\u67d3\u4e0d\u5168\uff0c\u8fd9\u662f\u76ee\u524d Flutter \u7684 DomCanvas \u540e\u7aef\u81ea\u8eab bug\uff0c\u6682\u65e0\u89e3\u51b3\u529e\u6cd5\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Flutter Math: \u4f7f\u7528\u7eaf&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/177377"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177377"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/177377\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177377"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}