I want to center the FloatingActionButton
horizontally on the screen but i don't seem to find any resource on how to do it..
This is my flutter code..
void main() => runApp(MaterialApp(
home: Home()
));
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('My App'),
centerTitle: true,
backgroundColor: Colors.brown[700],
),
floatingActionButton: FloatingActionButton(
onPressed: () {
// Add your onPressed code here!
},
child: Icon(Icons.add),
backgroundColor: Colors.brown[700],
),
backgroundColor: Colors.white70
);
}
}