I want to convert it to dart code but I dnt understand ternary operator in that code
const getPagination = (page, size) => {
const limit = size ? +size : 3
const from = page ? page * limit : 0
const to = page ? from + size - 1 : size - 1
return { from, to }
}
if you can tell me what code do line by line ??