Flutter 浮动动作按钮中的颤振位置文本?
我是否可以在扩展浮动操作按钮中定位文本 例如,我想将文本放置在按钮的右角 我该怎么做Flutter 浮动动作按钮中的颤振位置文本?,flutter,dart,Flutter,Dart,我是否可以在扩展浮动操作按钮中定位文本 例如,我想将文本放置在按钮的右角 我该怎么做 感谢您的帮助。脚手架中的FloatingAction按钮接受一个小部件。所以你可以这样做: floatingActionButton: Stack( children: [ FloatingActionButton.extended( // label cannot be null, but it's a widget // s
感谢您的帮助。脚手架中的FloatingAction按钮接受一个小部件。所以你可以这样做:
floatingActionButton: Stack(
children: [
FloatingActionButton.extended(
// label cannot be null, but it's a widget
// so it can be an empty container or something else
label: Text("button"),
icon: Icon(Icons.add),
onPressed: () {},
),
Positioned(right: 0.0, top: 0.0, child: Text("text")),
],
),
Scaffold中的FloatingActionButton接受一个小部件。所以你可以这样做:
floatingActionButton: Stack(
children: [
FloatingActionButton.extended(
// label cannot be null, but it's a widget
// so it can be an empty container or something else
label: Text("button"),
icon: Icon(Icons.add),
onPressed: () {},
),
Positioned(right: 0.0, top: 0.0, child: Text("text")),
],
),
尝试将文本小部件包装为带填充或将填充设置为浮动操作按钮。尝试将文本小部件包装为带填充或将填充设置为浮动操作按钮。您的问题解决了吗?:)您的问题解决了吗?:)