FeironoX5 Asked:2020-05-07 21:12:10 +0800 CST2020-05-07 21:12:10 +0800 CST 2020-05-07 21:12:10 +0800 CST FloatingActionButton 的大小 - Flutter 772 floatingActionButton: FloatingActionButton( backgroundColor: Theme.of(context).primaryColor, label: Text('Add', style: TextStyle( color: Colors.white ),), icon: Icon(Icons.add, color: Colors.white,) ) 如何调整按钮的大小?尝试填充。 вёрстка 1 个回答 Voted Best Answer FeironoX5 2020-05-07T21:27:16+08:002020-05-07T21:27:16+08:00 floatingActionButton: Container( height: 40, width: 100, child: FloatingActionButton.extended( onPressed: () { Navigator.of(context) .push(MaterialPageRoute(builder: (context) => CreateExeat())); }, backgroundColor: Theme.of(context).primaryColor, label: Text('Add', style: TextStyle( color: Colors.white ),), icon: Icon(Icons.add, color: Colors.white), ), ) 将 FloatingActionButton 放入容器中
将 FloatingActionButton 放入容器中