{"id":39428,"date":"2023-09-27T21:02:45","date_gmt":"2023-09-27T13:02:45","guid":{"rendered":"\/\/www.viralrail.com\/?p=39428"},"modified":"2023-09-27T21:02:45","modified_gmt":"2023-09-27T13:02:45","slug":"fyystxyzxdkptjjfa","status":"publish","type":"post","link":"\/\/www.viralrail.com\/blog\/39428.html","title":{"rendered":"Flutter\u4e0e\u539f\u751f\u901a\u4fe1\uff1a\u4e00\u79cd\u65b0\u7684\u8de8\u5e73\u53f0\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"

  Flutter\u662f\u4e00\u79cd\u7531Google\u5f00\u53d1\u7684\u8de8\u5e73\u53f0\u6846\u67b6\uff0c\u53ef\u4ee5\u7528\u4e8e\u5f00\u53d1iOS\u548cAndroid\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u4f7f\u7528\u4e00\u79cd\u79f0\u4e3aDart\u7684\u5f3a\u7c7b\u578b\u7f16\u7a0b\u8bed\u8a00\uff0c\u53ef\u4ee5\u6784\u5efa\u9ad8\u6027\u80fd\u7684\u5e94\u7528\u7a0b\u5e8f\u3002Flutter\u5177\u6709\u8bb8\u591a\u4f18\u70b9\uff0c\u5176\u4e2d\u6700\u91cd\u8981\u7684\u662f\u5b83\u5141\u8bb8\u5f00\u53d1\u4eba\u5458\u4f7f\u7528\u4e00\u79cd\u7f16\u7a0b\u8bed\u8a00\u6765\u5f00\u53d1\u539f\u751fiOS\u548cAndroid\u5e94\u7528\u7a0b\u5e8f\u3002\u7136\u800c\uff0cFlutter\u4e5f\u6709\u4e00\u4e9b\u5c40\u9650\u6027\uff0c\u5176\u4e2d\u6700\u91cd\u8981\u7684\u662f\u5b83\u4e0d\u652f\u6301\u4e0e\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u76f4\u63a5\u901a\u4fe1\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0cGoogle\u63d0\u51fa\u4e86\u4e00\u79cd\u65b0\u7684\u8de8\u5e73\u53f0\u89e3\u51b3\u65b9\u6848\uff0c\u79f0\u4e3aFlutter\u4e0e\u539f\u751f\u901a\u4fe1\u3002<\/p>\n

\u4ec0\u4e48\u662fFlutter\u4e0e\u539f\u751f\u901a\u4fe1\uff1f<\/h2>\n

  Flutter\u4e0e\u539f\u751f\u901a\u4fe1\uff08FNC\uff09\u662f\u4e00\u79cd\u65b0\u7684\u8de8\u5e73\u53f0\u89e3\u51b3\u65b9\u6848\uff0c\u5141\u8bb8\u5f00\u53d1\u4eba\u5458\u5728iOS\u548cAndroid\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1\u3002\u5b83\u7684\u57fa\u672c\u539f\u7406\u662f\uff1aFlutter\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u4f7f\u7528\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u7684\u63a5\u53e3\u6765\u8bbf\u95ee\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u6570\u636e\u548c\u529f\u80fd\u3002\u8fd9\u6837\uff0c\u5f00\u53d1\u4eba\u5458\u5c31\u53ef\u4ee5\u4f7f\u7528Flutter\u6765\u8bbf\u95ee\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\uff0c\u800c\u65e0\u9700\u7f16\u5199\u4efb\u4f55\u539f\u751f\u4ee3\u7801\u3002<\/p>\n

  FNC\u7684\u4f18\u70b9<\/h3>\n

  FNC\u7684\u6700\u5927\u4f18\u70b9\u662f\u5b83\u53ef\u4ee5\u6781\u5927\u5730\u7b80\u5316\u8de8\u5e73\u53f0\u5f00\u53d1\u3002\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u4f7f\u7528Flutter\u6765\u8bbf\u95ee\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u6570\u636e\u548c\u529f\u80fd\uff0c\u800c\u65e0\u9700\u7f16\u5199\u4efb\u4f55\u539f\u751f\u4ee3\u7801\u3002\u8fd9\u6837\uff0c\u5f00\u53d1\u4eba\u5458\u5c31\u53ef\u4ee5\u66f4\u5feb\u5730\u5f00\u53d1\u8de8\u5e73\u53f0\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728iOS\u548cAndroid\u4e4b\u95f4\u5171\u4eab\u4ee3\u7801\u3002\u6b64\u5916\uff0cFNC\u8fd8\u63d0\u4f9b\u4e86\u4e00\u79cd\u89e3\u51b3\u65b9\u6848\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u4eba\u5458\u5728\u4e0d\u540c\u5e73\u53f0\u4e4b\u95f4\u5171\u4eab\u6570\u636e\uff0c\u4ece\u800c\u5b9e\u73b0\u8de8\u5e73\u53f0\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u81f4\u6027\u3002<\/p>\n

  FNC\u7684\u7f3a\u70b9<\/h3>\n

  FNC\u7684\u7f3a\u70b9\u662f\u5b83\u9700\u8981\u4e00\u5b9a\u7684\u5b66\u4e60\u66f2\u7ebf\uff0c\u56e0\u4e3a\u5f00\u53d1\u4eba\u5458\u9700\u8981\u4e86\u89e3\u5982\u4f55\u4f7f\u7528FNC\u6765\u8bbf\u95ee\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\u3002\u6b64\u5916\uff0cFNC\u4e5f\u4e0d\u80fd\u5b8c\u5168\u66ff\u4ee3\u539f\u751f\u5f00\u53d1\uff0c\u56e0\u4e3a\u5b83\u53ea\u80fd\u8bbf\u95ee\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u7684\u63a5\u53e3\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5f00\u53d1\u4eba\u5458\u9700\u8981\u8bbf\u95ee\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u7279\u5b9a\u529f\u80fd\uff0c\u4ed6\u4eec\u4ecd\u7136\u9700\u8981\u7f16\u5199\u539f\u751f\u4ee3\u7801\u3002<\/p>\n

\u5982\u4f55\u5b9e\u73b0FNC\uff1f<\/h2>\n

  FNC\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u4e0d\u540c\u7684\u6280\u672f\u5b9e\u73b0\uff0c\u4f8b\u5982\uff1a<\/p>\n

  1. Platform Channels\uff1a<\/h3>\n

  Platform Channels\u662f\u4e00\u79cd\u6280\u672f\uff0c\u53ef\u4ee5\u8ba9Flutter\u5e94\u7528\u7a0b\u5e8f\u548c\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1\u3002\u5b83\u4f7f\u7528\u4e00\u79cd\u79f0\u4e3a\u201c\u6d88\u606f\u201d\u7684\u6280\u672f\uff0c\u53ef\u4ee5\u8ba9Flutter\u5e94\u7528\u7a0b\u5e8f\u53d1\u9001\u6d88\u606f\u7ed9\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u4e14\u53ef\u4ee5\u63a5\u6536\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u53d1\u9001\u7684\u6d88\u606f\u3002<\/p>\n

  2. Method Channels\uff1a<\/h3>\n

  Method Channels\u662f\u4e00\u79cd\u6280\u672f\uff0c\u53ef\u4ee5\u8ba9Flutter\u5e94\u7528\u7a0b\u5e8f\u8c03\u7528\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u65b9\u6cd5\u3002\u5b83\u4f7f\u7528\u4e00\u79cd\u79f0\u4e3a\u201c\u51fd\u6570\u8c03\u7528\u201d\u7684\u6280\u672f\uff0c\u53ef\u4ee5\u8ba9Flutter\u5e94\u7528\u7a0b\u5e8f\u8c03\u7528\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u51fd\u6570\uff0c\u5e76\u4e14\u53ef\u4ee5\u63a5\u6536\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u8fd4\u56de\u7684\u7ed3\u679c\u3002<\/p>\n

  3. Event Channels\uff1a<\/h3>\n

  Event Channels\u662f\u4e00\u79cd\u6280\u672f\uff0c\u53ef\u4ee5\u8ba9Flutter\u5e94\u7528\u7a0b\u5e8f\u8ba2\u9605\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u4e8b\u4ef6\u3002\u5b83\u4f7f\u7528\u4e00\u79cd\u79f0\u4e3a\u201c\u4e8b\u4ef6\u8ba2\u9605\u201d\u7684\u6280\u672f\uff0c\u53ef\u4ee5\u8ba9Flutter\u5e94\u7528\u7a0b\u5e8f\u8ba2\u9605\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u4e8b\u4ef6\uff0c\u5e76\u4e14\u53ef\u4ee5\u63a5\u6536\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u53d1\u51fa\u7684\u4e8b\u4ef6\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  Flutter\u4e0e\u539f\u751f\u901a\u4fe1\uff08FNC\uff09\u662f\u4e00\u79cd\u65b0\u7684\u8de8\u5e73\u53f0\u89e3\u51b3\u65b9\u6848\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u4eba\u5458\u5728iOS\u548cAndroid\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1\u3002<\/strong>\u5b83\u7684\u4f18\u70b9\u662f\u53ef\u4ee5\u6781\u5927\u5730\u7b80\u5316\u8de8\u5e73\u53f0\u5f00\u53d1\uff0c\u800c\u7f3a\u70b9\u662f\u9700\u8981\u4e00\u5b9a\u7684\u5b66\u4e60\u66f2\u7ebf\uff0c\u5e76\u4e14\u4e0d\u80fd\u5b8c\u5168\u66ff\u4ee3\u539f\u751f\u5f00\u53d1\u3002FNC\u53ef\u4ee5\u4f7f\u7528Platform Channels\u3001Method Channels\u548cEvent Channels\u7b49\u6280\u672f\u5b9e\u73b0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Flutter\u662f\u4e00\u79cd\u7531Google\u5f00\u53d1\u7684\u8de8\u5e73\u53f0\u6846\u67b6\uff0c\u53ef\u4ee5\u7528\u4e8e\u5f00\u53d1iOS\u548cAndroid\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u4f7f\u7528\u4e00\u79cd\u79f0\u4e3aDart\u7684\u5f3a\u7c7b\u578b\u7f16\u7a0b\u8bed\u8a00\uff0c\u53ef\u4ee5\u6784\u5efa\u9ad8\u6027\u80fd\u7684\u5e94\u7528\u7a0b\u5e8f\u3002Flut<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[45],"class_list":["post-39428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-txxt"],"_links":{"self":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/39428"}],"collection":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/comments?post=39428"}],"version-history":[{"count":0,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/39428\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media?parent=39428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/categories?post=39428"},{"taxonomy":"post_tag","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/tags?post=39428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}