- Please add a
Todo
button in theBottomNavigationBar
. And then create a screen that list out the todos. (You can reference toPosts
to do it)
API | Method |
---|---|
https://jsonplaceholder.typicode.com/todos?userId=1 | GET |
Response Example:
[
{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
},
{
"userId": 1,
"id": 2,
"title": "quis ut nam facilis et officia qui",
"completed": false
}
]
- Please add a
+
button icon in the top right corner in theAppBar
- Please create a screen that can let user to create a todo
API | Method |
---|---|
https://jsonplaceholder.typicode.com/todos | POST |
Request Example:
{
userId: 1,
title: 'Hello',
}
Response Example:
{
"userId": 1,
"id": 201,
"title": "Hello",
"completed": false
}
- In the Todo list screen, when user press the checkbox button, call api to update
completed
status and show corresponding UI result of thecompleted
.
(You don't need to base on the response success update the UI because this api is faked. Just based on the last status of thecompleted
, then show the opposite value the thatcompleted
.)