Created
June 26, 2022 18:29
-
-
Save ulisseshen/5b08bed25d3f0e81081548990003d5f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FutureBuilder<Album>( | |
future: futureAlbum, | |
builder: (context, snapshot) { | |
if (snapshot.hasData) { | |
return Text(snapshot.data!.title); | |
} else if (snapshot.hasError) { | |
return Text('${snapshot.error}'); | |
} | |
// By default, show a loading spinner. | |
return const CircularProgressIndicator(); | |
}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment