Member-only story
Flutter Button Types and What Are the Deprecated Button Types and How to Replace Them
In this article, I will share how to use buttons in Flutter. I will discuss the elevated, outlined, icon and text buttons in detail. And I have added what the deprecated button types are and how they convert into existing built-in button types. Knowing about all these types of buttons is very important when designing and developing your Flutter app UI.
Elevated Button
The elevated button is just a built-in widget in Flutter. Specifically, there have the shape and design of a button and onpressed functionality. No any special than that.
As a beginner, you know that the centre is currently covering the whole screen area. so whatever will be in the centre will be at the screen’s centre. In my examples below, I used a child to pass the elevated, outlined, icon and text button widgets.
Center(
child: ElevatedButton(
onPressed: () { },
child: Text("Start Shopping"),
style: ElevatedButton.styleFrom(
padding: EdgeInsets.all(20.0),
fixedSize: Size(300, 80),
textStyle: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
primary: Colors.blue,
onPrimary…