You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although it’s convenient, it’s not recommended to put an API call in a build() method.
Flutter calls the build() method every time it wants to change anything in the view, and this happens surprisingly often. If you leave the fetch call in your build() method, you’ll flood the API with unnecessary calls and slow down your app.
Source: https://flutter.dev/docs/cookbook/networking/fetch-data#why-is-fetchpost-called-in-initstate
The text was updated successfully, but these errors were encountered: