Can I use initState in stateless widget?

But you shouldn’t! In fact, your IDE will give you a warning, because this is not the way to go with Stateless widget as it is marked as @immutable . If you need to use lifecycle methods (like initState() ) you should make it a Stateful widget . There’s no big deal.21 Şub 2019

Sizin İçin Seçtik  Ordinal fayda öncüleri kimlerdir?

Leave a Reply

Your email address will not be published. Required fields are marked *