[英]Flutter Material 'Tap to update' Button
Is there an 'out of the box' implementation of the functionality you get in the google app/etc.您在谷歌应用程序/等中获得的功能是否有“开箱即用”的实现? where the button at the bottom appears that allows you to 'Tap to update'?底部的按钮出现在哪里,允许您“点击更新”? A custom snack bar doesn't seem viable as you have to have the title as well as the onTap action.自定义小吃店似乎不可行,因为您必须拥有标题和 onTap 操作。
Try Using Floating Action Button尝试使用浮动操作按钮
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: ClipRRect(
borderRadius: BorderRadius.circular(20),
child: Container(
height: 40,
child: RaisedButton(
color: Colors.blue,
onPressed: () => {},
child: Text('Tap to Update'),
),
),
),
try this combination试试这个组合
Scaffold(
bottomNavigationBar: FlatButton(
child: Text('Flat Button'),
onPressed: () {},
),
floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat,
floatingActionButton: RaisedButton(
child: Text('Floating Button'),
onPressed: () {},
),
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.