{"id":986,"date":"2022-04-17T16:16:00","date_gmt":"2022-04-17T08:16:00","guid":{"rendered":"http:\/\/blog.xrhoujie.com\/?p=986"},"modified":"2022-04-28T16:21:15","modified_gmt":"2022-04-28T08:21:15","slug":"flutter%e5%9f%ba%e7%a1%80%e6%95%99%e7%a8%8brow%e5%b8%83%e5%b1%80","status":"publish","type":"post","link":"http:\/\/blog.xrhoujie.com\/?p=986","title":{"rendered":"flutter\u57fa\u7840\u6559\u7a0b(row\u5e03\u5c40)"},"content":{"rendered":"\n<p id=\"block-030dfeed-c84e-4fe1-a8a9-e141498a739e\"><br>\u5206\u4eab\u51e0\u4e2a\u5b66\u4e60flutter\u7684\u5b66\u4e60\u7f51\u7ad9\u4e0e\u8d44\u6e90<\/p>\n\n\n\n<p id=\"block-f1339a6b-7e25-45b8-8069-510d5c150a9b\">flutter\u5b9e\u6218\u7b2c\u4e8c\u7248<a href=\"https:\/\/book.flutterchina.club\/chapter6\/gridview.html#_6-6-1-%E9%BB%98%E8%AE%A4%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0\">https:\/\/book.flutterchina.club\/chapter6\/gridview.html#_6-6-1-%E9%BB%98%E8%AE%A4%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0<\/a><\/p>\n\n\n\n<p id=\"block-ce954fb4-619d-4f9d-acfd-5b4395e2016c\">flutter\u4e2d\u6587\u6587\u6863<a href=\"https:\/\/flutter.cn\/docs\/get-started\/flutter-for\/web-devs\">https:\/\/flutter.cn\/docs\/get-started\/flutter-for\/web-devs<\/a><\/p>\n\n\n\n<p><strong>main_row_no.dart<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import 'package:flutter\/material.dart';\nvoid main () => runApp(MyApp());\n\nclass MyApp extends StatelessWidget{\n  @override\n  Widget build(BuildContext context ){\n      return MaterialApp(\n        title:'ListView widget',\n\n        home:Scaffold(\n          appBar:new AppBar(\n            title:new Text('\u6c34\u5e73\u65b9\u5411\u5e03\u5c40'),\n          ),\n          body:new Row(\n            children: &lt;Widget>&#91;\n              new RaisedButton(\n                onPressed: (){\n\n                },\n                color:Colors.redAccent,\n                child:new Text('\u7ea2\u8272\u6309\u94ae')\n              ),\n              new RaisedButton(\n                onPressed: (){\n\n                },\n                color:Colors.orangeAccent,\n                child: new Text('\u9ec4\u8272\u6309\u94ae'),\n              ),  \n              new RaisedButton(\n                onPressed: (){\n\n                },\n                color:Colors.pinkAccent,\n                child:new Text('\u7c89\u8272\u6309\u94ae')\n              )\n            ],\n          )\n        ),\n      );\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>main_row_Mix_expanded.dart<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import 'package:flutter\/material.dart';\nvoid main () => runApp(MyApp());\n\nclass MyApp extends StatelessWidget{\n  @override\n  Widget build(BuildContext context ){\n      return MaterialApp(\n        title:'ListView widget',\n\n        home:Scaffold(\n          appBar:new AppBar(\n            title:new Text('\u6c34\u5e73\u65b9\u5411\u5e03\u5c40'),\n          ),\n          body:new Row(\n            children: &lt;Widget>&#91;\n             new RaisedButton(\n                onPressed: (){\n\n                },\n                color:Colors.redAccent,\n                child:new Text('\u7ea2\u8272\u6309\u94ae')\n            ),\n            Expanded(child:new RaisedButton(\n                onPressed: (){\n\n                  },\n                  color:Colors.orangeAccent,\n                  child: new Text('\u9ec4\u8272\u6309\u94ae'),\n                )\n\n              ),\n            new RaisedButton(\n                onPressed: (){\n                },\n                color:Colors.pinkAccent,\n                child:new Text('\u7c89\u8272\u6309\u94ae')\n              )\n            ],\n          )\n        ),\n      );\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>main_row_expanded.dart<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import 'package:flutter\/material.dart';\nvoid main () => runApp(MyApp());\n\nclass MyApp extends StatelessWidget{\n  @override\n  Widget build(BuildContext context ){\n      return MaterialApp(\n        title:'ListView widget',\n\n        home:Scaffold(\n          appBar:new AppBar(\n            title:new Text('\u6c34\u5e73\u65b9\u5411\u5e03\u5c40'),\n          ),\n          body:new Row(\n            children: &lt;Widget>&#91;\n              Expanded(child:new RaisedButton(\n                onPressed: (){         \n                },\n                color:Colors.redAccent,\n                child:new Text('\u7ea2\u8272\u6309\u94ae')\n              )),\n              Expanded(child:new RaisedButton(\n                onPressed: (){\n                  },\n                  color:Colors.orangeAccent,\n                  child: new Text('\u9ec4\u8272\u6309\u94ae'),\n                )\n\n              ),\n              Expanded(child:new RaisedButton(\n                onPressed: (){\n                },\n                color:Colors.pinkAccent,\n                child:new Text('\u7c89\u8272\u6309\u94ae')\n              )             \n              )\n            ],\n          )\n        ),\n      );\n  }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5206\u4eab\u51e0\u4e2a\u5b66\u4e60flutter\u7684\u5b66\u4e60\u7f51\u7ad9\u4e0e\u8d44\u6e90 flutter\u5b9e\u6218\u7b2c\u4e8c\u7248https:\/\/book.flutterc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[43,1],"tags":[42],"_links":{"self":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/986"}],"collection":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=986"}],"version-history":[{"count":1,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":987,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/986\/revisions\/987"}],"wp:attachment":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}