BoxDecoration to let you draw an image in a box area.
NetworkImage to load an image from the network.
Notice how you’re using a decoration to display a network image. You don’t have to do a thing — just wrap the cat URL in a NetworkImage widget. Awesome, right? :]
Build and run your app, and tap any breed. You’ll now see cat images for each breed. Congratulations!
Where to Go From Here?
You can download the final completed project by clicking Download materials at the top or bottom of this tutorial.
Wow, that was a lot of work, but you learned how to:
Use the HTTP library to issue network API requests.
Feel free to share your feedback and findings or ask any questions in the comments below or in the forums. I hope you enjoyed learning about JSON parsing in Flutter!
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.