Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 1.05 KB

README.md

File metadata and controls

20 lines (15 loc) · 1.05 KB

Pets Adoption App 🦄

Ipets

🍋 Instructions

Get pets, type: Get, https://coded-pets-api-crud.eapi.joincoded.com/pets
Create a new pet, type: Post, https://coded-pets-api-crud.eapi.joincoded.com/pets
Update a pet, type: Put, https://coded-pets-api-crud.eapi.joincoded.com/pets/{petId}
Delete a pet, type: Delete, https://coded-pets-api-crud.eapi.joincoded.com/pets/{petId}
Adopt a pet, type: Post, https://coded-pets-api-crud.eapi.joincoded.com/pets/adopt/{petId}
  1. In your pages/home_page.dart, Wrap your grid view builder with a FutureBuilder widget.
  2. Assign the future property to the getPets function we created in our provider.
  3. Use the dataSnapshot argument to check if the data is still loading, and in this case, return a spinner. Or if there's an error, show the error in a Text widget.