For example, if you have a bunch of custom buttons, do you make a class (for example, CustomButtons) and then have static functions that return different buttons? Or do you make dart files and make independent widget constants?

There are different ways to do custom widgets... like another one is having const widget themes and then creating widgets on the spot and using those themes.

What is the best practice?

Solution 1: Junaid Hassan Final

It depends If you have a complex widget then you must create a separate file and create your custom widget there. But if your widget is small then use static function etc.