Can I use context in initState Flutter?

The framework will call this method exactly once for each [State] object it creates. This will be called once. So perform work which required to be performed only once, but remember context can’t be used here, as widget state gets loaded only initState() work is done.

Sizin İçin Seçtik  Why stateless is better than stateful?

Leave a Reply

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