{"id":720,"date":"2019-01-12T12:27:25","date_gmt":"2019-01-12T04:27:25","guid":{"rendered":"http:\/\/www.tairongkj.com\/?p=720"},"modified":"2019-01-12T18:55:57","modified_gmt":"2019-01-12T10:55:57","slug":"%e6%8c%89%e9%92%ae%e6%89%81%e5%b9%b3%e5%8c%96%e7%94%a8%e6%b3%95%e7%a4%ba%e4%be%8b-buildflatbutton","status":"publish","type":"post","link":"https:\/\/www.tairongkj.com\/?p=720","title":{"rendered":"\u6309\u94ae\u6241\u5e73\u5316\u7528\u6cd5\u793a\u4f8b-buildFlatButton"},"content":{"rendered":"<pre data-lang=\"dart\"><code>Widget buildFlatButton() {\r\n    return Align(\r\n      alignment: const Alignment(0.0, -0.2),\r\n      child: Column(\r\n        mainAxisSize: MainAxisSize.min,\r\n        children: &lt;Widget&gt;[\r\n          ButtonBar(\r\n            mainAxisSize: MainAxisSize.min,\r\n            children: &lt;Widget&gt;[\r\n              FlatButton(\r\n                child: const Text('FLAT BUTTON', semanticsLabel: 'FLAT BUTTON 1'),\r\n                onPressed: () {\r\n                  \/\/ Perform some action\r\n                },\r\n              ),\r\n              const FlatButton(\r\n                child: Text('DISABLED', semanticsLabel: 'DISABLED BUTTON 3',),\r\n                onPressed: null,\r\n              ),\r\n            ],\r\n          ),\r\n          ButtonBar(\r\n            mainAxisSize: MainAxisSize.min,\r\n            children: &lt;Widget&gt;[\r\n              FlatButton.icon(\r\n                icon: const Icon(Icons.add_circle_outline, size: 18.0),\r\n                label: const Text('FLAT BUTTON', semanticsLabel: 'FLAT BUTTON 2'),\r\n                onPressed: () {\r\n                  \/\/ Perform some action\r\n                },\r\n              ),\r\n              FlatButton.icon(\r\n                icon: const Icon(Icons.add_circle_outline, size: 18.0),\r\n                label: const Text('DISABLED', semanticsLabel: 'DISABLED BUTTON 4'),\r\n                onPressed: null,\r\n              ),\r\n            ],\r\n          ),\r\n        ],\r\n      ),\r\n    );\r\n  }<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre data-lang=\"ruby\"><code>  factory FlatButton.icon({\r\n    Key key,\r\n    @required VoidCallback onPressed,\r\n    ValueChanged&lt;bool&gt; onHighlightChanged,\r\n    ButtonTextTheme textTheme,\r\n    Color textColor,\r\n    Color disabledTextColor,\r\n    Color color,\r\n    Color disabledColor,\r\n    Color highlightColor,\r\n    Color splashColor,\r\n    Brightness colorBrightness,\r\n    EdgeInsetsGeometry padding,\r\n    ShapeBorder shape,\r\n    Clip clipBehavior,\r\n    MaterialTapTargetSize materialTapTargetSize,\r\n    @required Widget icon,\r\n    @required Widget label,\r\n  }) = _FlatButtonWithIcon;<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre data-lang=\"ruby\"><code> const FlatButton({\r\n    Key key,\r\n    @required VoidCallback onPressed,\r\n    ValueChanged&lt;bool&gt; onHighlightChanged,\r\n    ButtonTextTheme textTheme,\r\n    Color textColor,\r\n    Color disabledTextColor,\r\n    Color color,\r\n    Color disabledColor,\r\n    Color highlightColor,\r\n    Color splashColor,\r\n    Brightness colorBrightness,\r\n    EdgeInsetsGeometry padding,\r\n    ShapeBorder shape,\r\n    Clip clipBehavior = Clip.none,\r\n    MaterialTapTargetSize materialTapTargetSize,\r\n    @required Widget child,\r\n  }) : super(\r\n         key: key,\r\n         onPressed: onPressed,\r\n         onHighlightChanged: onHighlightChanged,\r\n         textTheme: textTheme,\r\n         textColor: textColor,\r\n         disabledTextColor: disabledTextColor,\r\n         color: color,\r\n         disabledColor: disabledColor,\r\n         highlightColor: highlightColor,\r\n         splashColor: splashColor,\r\n         colorBrightness: colorBrightness,\r\n         padding: padding,\r\n         shape: shape,\r\n         clipBehavior: clipBehavior,\r\n         materialTapTargetSize: materialTapTargetSize,\r\n         child: child,\r\n      );<\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6309\u94ae\u6241\u5e73\u5316\u7528\u6cd5\u793a\u4f8b-buildFlatButton<\/p>\n","protected":false},"author":1,"featured_media":721,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[5],"series":[23],"class_list":{"0":"post-720","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-flutterstudys","8":"tag-flutter","9":"series-flutter","11":"post-with-thumbnail","12":"post-with-thumbnail-large"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=\/wp\/v2\/posts\/720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=720"}],"version-history":[{"count":1,"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=\/wp\/v2\/posts\/720\/revisions"}],"predecessor-version":[{"id":722,"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=\/wp\/v2\/posts\/720\/revisions\/722"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=\/wp\/v2\/media\/721"}],"wp:attachment":[{"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=720"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.tairongkj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}