颤振中的全宽floatactionbutton?

时间:2020-02-05 09:28:13

标签: flutter

如何在不使用屏幕底部抖动的情况下实现全宽的floatactionbutton

1 个答案:

答案 0 :(得分:0)

您可以使用其他方法。您可以使用堆栈来实现相同的功能。

Stack(
children: <Widget>[
        Align(
      alignment: Alignment.bottomCenter,
      child: Container(
        width: MediaQuery.of(context).size.width,
        height: 55,
        child: FloatingActionButton.extended(
          onPressed: () {

          },
          backgroundColor: Colors.green,
          icon: Icon( Icons.add),
          label: Text(
            'ADD',
            style: TextStyle(fontSize: 18),
          ),
          shape: RoundedRectangleBorder(),
        ),
      ),
    )
]
)