Solution: Fetching Movies at App Startup
In this lesson, you'll explore the solution to the "Fetching Movies at App Startup" challenge.
We'll cover the following...
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.
@override
void initState() {
super.initState();
fetchMovies();
}
Access this course and 1400+ top-rated courses and projects.