Skip to content

Instantly share code, notes, and snippets.

@anoobbava
Created October 18, 2021 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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