What is the difference between functions and classes to create reusable widgets?

后端 未结 5 2102
野的像风
野的像风 2020-11-22 10:20

I have realized that it is possible to create widgets using plain functions instead of subclassing StatelessWidget. An example would be this:

Widget functio         


        
5条回答
  •  执笔经年
    2020-11-22 11:08

    There was a Big difference between what functions does and what class does.


    Lets I will explain it from very scratch.

提交回复
热议问题