\u5b89\u5353app\u5f00\u53d1\u5de5\u5177<\/a>ter \u9879\u76ee\u4e3b\u8981\u5305\u542b\u4ee5\u4e0b\u6587\u4ef6\uff1a<\/p>\n– lib\/main.dart\uff1a\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u5165\u53e3\u6587\u4ef6\u3002<\/p>\n
– pubspec.yaml\uff1a\u914d\u7f6e\u6587\u4ef6\uff0c\u5305\u542b\u5e94\u7528\u7a0b\u5e8f\u7684\u4fe1\u606f\uff0c\u5982\u7248\u672c\u53f7\u3001\u4f5c\u8005\u3001\u63cf\u8ff0\u3001\u4f9d\u8d56\u5305\u7b49\u3002<\/p>\n
– android\uff1a\u4fdd\u5b58\u7f16\u8bd1\u6210 Android APP \u6240\u9700\u7684\u8d44\u6e90\u3002<\/p>\n
– ios\uff1a\u4fdd\u5b58\u7f16\u8bd1\u6210 iOS APP \u6240\u9700\u7684\u8d44\u6e90\u3002<\/p>\n
3.3 \u7f16\u5199\u4ee3\u7801\u5e76\u8fd0\u884c<\/p>\n
\u66ff\u6362 lib\/main.dart \u4e2d\u7684\u9ed8\u8ba4\u4ee3\u7801\uff0c\u5e76\u7c98\u8d34\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n
“`<\/p>\n
import ‘package:flutter\/material.dart’;<\/p>\n
void main() => runApp(MyApp());<\/p>\n
class MyApp extends StatelessWidget {<\/p>\n
@override<\/p>\n
Widget build(BuildContext context) {<\/p>\n
return MaterialApp(<\/p>\n
title: ‘\u6211\u7684\u5b89\u5353\u5e94\u7528’,<\/p>\n
theme: ThemeData(primarySwatch: Colors.blue),<\/p>\n
home: MyHomePage(),<\/p>\n
);<\/p>\n
}<\/p>\n
}<\/p>\n
class MyHomePage extends StatelessWidget {<\/p>\n
@override<\/p>\n
Widget build(BuildContext context) {<\/p>\n
return Scaffold(<\/p>\n
appBar: AppBar(title: Text(‘\u6b22\u8fce\u6765\u5230\u6211\u7684\u5e94\u7528’)),<\/p>\n
body: Center(child: Text(‘\u4f60\u597d\uff0c\u8fd9\u662f\u6211\u7684\u7b2c\u4e00\u4e2a\u5b89\u5353\u5e94\u7528!’)),<\/p>\n
);<\/p>\n
}<\/p>\n
}<\/p>\n
“`<\/p>\n
\u4e4b\u540e\uff0c\u8fde\u63a5\u4f60\u7684 Android \u8bbe\u5907\u6216\u6253\u5f00\u6a21\u62df\u5668\uff0c\u5e76\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u3002<\/p>\n
\u5728\u8bbe\u5907\u4e0a\uff0c\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u6807\u9898\u4e3a “\u6b22\u8fce\u6765\u5230\u6211\u7684\u5e94\u7528” \u7684\u754c\u9762\uff0c\u5c4f\u5e55\u4e2d\u95f4\u663e\u793a “\u4f60\u597d\uff0c\u8fd9\u662f\u6211\u7684\u7b2c\u4e00\u4e2a\u5b89\u5353\u5e94\u7528!” \u7684\u6587\u672c\u3002\u606d\u559c\uff01\u4f60\u5df2\u6210\u529f\u5730\u4f7f\u7528 Flutter \u521b\u5efa\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u5b89\u5353\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n
\u603b\u7ed3\uff1a\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u4e86\u89e3\u4e86\u5982\u4f55\u4f7f\u7528 Flutter \u5f00\u53d1\u4e00\u4e2a\u5b89\u5353\u5e94\u7528\u7a0b\u5e8f\u3002\u6211\u4eec\u4ece\u5b83\u7684\u539f\u7406\u3001\u73af\u5883\u642d\u5efa\u5230\u5b9e\u9645\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u4e86\u8be6\u7ec6\u8bb2\u89e3\u3002\u5e0c\u671b\u8fd9\u4e9b\u77e5\u8bc6\u53ef\u4ee5\u5e2e\u52a9\u4f60\u8f7b\u677e\u5165\u95e8\u3002\u4e0b\u4e00\u6b65\uff0c\u4f60\u53ef\u4ee5\u8fdb\u4e00\u6b65\u5b66\u4e60\u5982\u4f55\u5f00\u53d1\u5177\u6709\u66f4\u590d\u6742\u529f\u80fd\u548c\u754c\u9762\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u795d\u4f60\u5b66\u4e60\u6109\u5feb\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"
\u6807\u9898\uff1aFlutter \u5f00\u53d1\u5b89\u5353 APP – \u8ba9\u6211\u4eec\u6765\u8ba4\u8bc6\u4e0b\u5b83\u7684\u539f\u7406\u4ee5\u53ca\u8be6\u7ec6\u4ecb\u7ecd\u6458\u8981\uff1a\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Flutter \u5f00\u53d1\u4e00\u4e2a\u5b89\u5353\u5e94\u7528\u7a0b\u5e8f\u3002\u6211\u4eec\u5c06\u4ece\u5b83\u7684\u539f\u7406\u3001\u73af\u5883\u642d\u5efa\u5230\u5b9e\u9645\u521b\u5efa\u4e00\u4e2a\u7b80<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[15261,1053,15262,14,15263],"class_list":{"0":"post-8726","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-zuoapp","7":"tag-app","8":"tag-1053","10":"tag-14","11":"tag-15263"},"_links":{"self":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/8726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/comments?post=8726"}],"version-history":[{"count":0,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/8726\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/media?parent=8726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/categories?post=8726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/tags?post=8726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}