After Flutter Upgrade "FlatButton" is deprecated and I have to use TextButton instead. I didn't find a solution for a new button-type with width and height.
This is my working FlatButton. How can I solve it with textButton or elevatedButton?
_buttonPreview(double _height, double _width) {
return FlatButton(
onPressed: () { },
height: _height,
minWidth: _width,
color: Colors.grey,
padding: EdgeInsets.all(0),
child: Text(
"some text",
style: TextStyle(color: Colors.white),
),
);
}
I followed the guide here: https://flutter.dev/docs/release/breaking-changes/buttons.