title: Subclass a class that extends StatelessWidget or StatefulWidget class
body: <p>Is it possible to create a class that extends a class extending StatelessWidget or StatefulWidget.</p>
  
  <p>For example:</p>
  
  <pre><code>class MyButton extends StatelessWidget {
  final String label;
  Button({this.label});
  @override
  Widget build(BuildContext context) {
      return ButtonExample("label");}
  }
  </code></pre>
  
  <p>then</p>
  
  <pre><code>class SubmitButton extends MyButton
  {
     String label;
     SubmitButton({Key key, this.label}) : super(label: label);
  
  // then somehow extend the parent build and change only the color
  // or in case of StatefulWidget change a functionality
  }
  </code></pre>
  
  <p>I tried to search for examples online but I had not success.</p>