First of all I would like to say that I am new to Flutter.
I don't understand the difference between class and stateless widget. I understand why I'm using stateful , because of setState. but why should I use statless instead of just class ?
First of all I would like to say that I am new to Flutter.
I don't understand the difference between class and stateless widget. I understand why I'm using stateful , because of setState. but why should I use statless instead of just class ?
Copyright © 2021 Jogjafile Inc.
Difference is actually depends on your application really but using
classis more preferable in most cases. They are same, for the performance part, if you will not callsetStateinWidget. There are other differences like testability and accuracy. I suggest you first watch official flutter tutorial before using which one to use. Official tutorial