[英]How to create a vertical button in the flutter?
im try to created a verticle button on the left center screen in the flutter.我尝试在颤动的左侧中心屏幕上创建一个垂直按钮。 First i created a Raised Button and rotate it using Rotated Box.首先,我创建了一个凸起按钮并使用旋转框旋转它。 But it keeping padding left side of the button.但它保持按钮左侧的填充。 i dont want padding on the left side.我不想在左侧填充。 How to possible it ?怎么可能呢?
body: Stack(
children: <Widget>[
Align(
alignment: Alignment.centerLeft,
child: RotatedBox(
quarterTurns: 1,
child: RaisedButton(padding: EdgeInsets.all(0), color: Clr.primaryClr, onPressed: () {}, child: Text('SPORTS')))),
pages[currentPage],
],
),
您可以使用以下方法删除按钮的填充:
RaisedButton(materialTapTargetSize: MaterialTapTargetSize.shrinkWrap)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.