Differences worth mentioning are that in the 2nd example the object NewTextField inherits from StatelessWidget which on the one hand extends NewTextField with the members and functionalities of StatelessWidget (object is larger). Furthermore, it makes your widget stateless, while CustomTextField remains statefull because TextField is statefull.
2
Answers
In my simple opinion because when you declare a variable a memory area is allocated and in the second class you have 2 variables declared, namely:
Differences worth mentioning are that in the 2nd example the object NewTextField inherits from StatelessWidget which on the one hand extends NewTextField with the members and functionalities of StatelessWidget (object is larger). Furthermore, it makes your widget stateless, while CustomTextField remains statefull because TextField is statefull.