- Fork and clone this repository to your
Development
folder. - Endpoints:
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}
- In your
pages/home_page.dart
, Wrap your grid view builder with aFutureBuilder
widget. - Assign the
future
property to thegetPets
function we created in our provider. - 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 aText
widget.