How to add a Footer Buttons in Flutter?

This Article is posted by seven.srikanth at 15-08-2019 14:02:41

Footer Buttons in flutter can be achieved by adding persistenFooderButtons properties to the Scaffold. In this post, I'm going to share the code to achieve the same.
Here is how the final output is going to look.
Here is the code from main.dart file. 
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Building Layouts with FLutter'),
),
body: Center(
child: Text(
'Hello Flutter Layouts',
style: TextStyle(fontSize: 24),
),
),
floatingActionButton: FloatingActionButton(
onPressed: () {
print('You clicked');
},
child: Icon(Icons.lightbulb_outline),
),
persistentFooterButtons: <Widget>[
IconButton(
icon: Icon(Icons.add), onPressed: () {},
),
IconButton(
icon: Icon(Icons.alarm), onPressed: () {},
),
IconButton(
icon: Icon(Icons.add_location), onPressed: () {},
),
],
),
);
}
}
Hope this example will be useful to you.
If you are interest in an alternate way of achiving the same, here is another example https://fluttercentral.com/Articles/Post/1140
Thanks,
Srikanth

Tags: Scaffold; persistentFooterButtons;



0 Comments
Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.



Recent Articles


How to add Assets Images and Network images in flutter?

Posted by bloggeraatit on 20 Sep 2019 Article


How to use inkwell class for responding images in flutter?

Posted by bloggeraatit on 20 Sep 2019 Article


Flutter Web Live on Server

Posted by nikhilchaudhary12155 on 18 Sep 2019 Article


How to specify stops in a gradient?

Posted by seven.srikanth on 20 Sep 2019 Article



© 2018 - Fluttercentral | Email to me - Seven.srikanth@gmail.com