Why do you want to extend RaisedButton?
Another way is to simply create a custom widget:
class MyButton {
final double height;
final String text;
final VoidCallback onPressed;
MyButton({
this.text,
this.onPressed,
this.height,
});
@override
Widget build(BuildContext context) => SizedBox(
height: height,
child: RaisedButton(child: Text(text), onPressed: onPressed),
);
}
CLICK HERE to find out more related problems solutions.