Solution: Fetching Movies at App Startup

In this lesson, you'll explore the solution to the "Fetching Movies at App Startup" challenge.

Solution: Fetching data at startup

The initState() method is called only once when a state object is created.

Check out the value of counter when fetchMovies() is moved to initState() which is called only once.

  void initState() {

Get hands-on with 1200+ tech skills courses.