gpt4 book ai didi

dart - 如何更改 FloatingActionButton extended 中的图标位置

转载 作者:IT王子 更新时间:2023-10-29 06:57:12 26 4
gpt4 key购买 nike

FloatingActionButton extended 的图标在左边,怎么把图标放到右边?正文之后

floatingActionButton: FloatingActionButton.extended(   
onPressed: (){},
label: Text("Next",),
icon: Icon(Icons.arrow_forward,
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat

最佳答案

没有任何直接的方法可以做到这一点。但作为一种解决方法,您可以将 Row 小部件(其中包含 TextIcon 小部件)传递给 label 参数。

floatingActionButton: FloatingActionButton.extended(
onPressed: () {},
label: Row(
children: <Widget>[Text("Proceed"), Icon(Icons.arrow_forward)],
),
icon: Container(),
),

希望对您有所帮助。

关于dart - 如何更改 FloatingActionButton extended 中的图标位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55978855/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com