Skip to content

Instantly share code, notes, and snippets.

@anoobbava
Created October 18, 2021 04:56
Show Gist options
  • Save anoobbava/2643af7d6f19450084377c76871b940d to your computer and use it in GitHub Desktop.
Save anoobbava/2643af7d6f19450084377c76871b940d to your computer and use it in GitHub Desktop.
blogging
Widget build(BuildContext context) {
return FutureBuilder(
future: fetchMovies(),
builder: (context, AsyncSnapshot snapshot) {
if (!snapshot.hasData) {
return Center(
child: Image.asset('assets/images/loading.gif'),
);
} else {
return HorizontalCards(snapshot.data.movies);
}
},
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment