DEV Community

leminhduc1202
leminhduc1202

Posted on

Answer: Flutter FlatButton is deprecated - alternative solution with width and height

FlatButton also can replace with MaterialButton

  MaterialButton(
                 onPressed: () {  },
                 height: _height,
                 minWidth: _width,
                 color: Colors.grey,
                 padding: EdgeInsets.all(0),
                 child: Text(
                     "some text",
                     style: TextStyle(color: Colors.white),
                   ),
                 ),

Top comments (0)