Beginner question... Flutter materials say to extend stateless or stateful widget class... but in the tutorials there were a couple examples where widgets were not defined as classes.
Widget buttonSection = Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
...
],
),
);
https://flutter.dev/docs/development/ui/layout/tutorial#step-0-create-the-app-base-code
vs
class ButtonSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
return (...)
}
Should small simple widgets just be variables inside your class? or their own class that extends stateful or stateless parent class.