Is it possible to create a class that extends a class extending StatelessWidget or StatefulWidget.
For example:
class MyButton extends StatelessWidge
You can use mixins. Check dart docs or flutter docs on how to use them. Using mixins, you can add properties/functions to existing class. You would have already seen an example in animation controllers.