I want to add more than one FloatingActionbutton on the flutter app screen. but build
function can contain only on floating button How can I add floatingActionButton
on the page
- 4 years ago
Hello, floatingActionButton is also a widget you can add or append your own customize widget so you can add Column or Row anything else which can meet your requirements.
floatingActionButton:Column( crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end, children: [ FloatingActionButton.extended( onPressed: (){ print("Office floating se"); }, label: Text('To My Office!'), icon: Icon(Icons.laptop), ), FloatingActionButton( heroTag: null, child: Icon(Icons.share,color: Colors.white,), onPressed: (){}, ), ], )
- 4 years ago
Hello, floatingActionButton is also a widget you can add or append your own customize widget so you can add Column or Row anything else which can meet your requirements.
floatingActionButton:Column( crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end, children: [ FloatingActionButton.extended( onPressed: (){ print("Office floating se"); }, label: Text('To My Office!'), icon: Icon(Icons.laptop), ), FloatingActionButton( heroTag: null, child: Icon(Icons.share,color: Colors.white,), onPressed: (){}, ), ], )
Hot Questions