0

I'd like you to guide me on how I can detect if a user has seen an item so implement a view counter

as on the image below

An exemple of view counter

Is there any widget I need to use to get this result? What searches do I need to do to get this result?

Steeven Delucis
  • 293
  • 2
  • 14
  • These kind of things stored at backend but if you want to store it on your device, you can use local DB like sqflite and in "init state" method of the page, increment the count of the views in the DB. – Arib Yousuf Feb 14 '21 at 12:18
  • Yes I know, I store this data in the back-end, what I see is to know how to detect when the user sees the computer and then increment my counter. – Steeven Delucis Feb 14 '21 at 12:24
  • Didn't get which computer you're talking about? You can check if the page completely loads then you can increment the counter. – Arib Yousuf Feb 14 '21 at 12:33
  • Sorry, my mistake... EDIT Yes I know, I store this data in the back-end, what I see is to know how to detect when the user sees the post or article and then increment my counter – Steeven Delucis Feb 14 '21 at 12:35
  • 1
    If you want to get this behavior on scrolling the list then you can get help from this link https://stackoverflow.com/questions/51069712/how-to-know-if-a-widget-is-visible-within-a-viewport/57252652#57252652 and if you want to get it on the separate screen then you can follow the above mentioned approach. – Arib Yousuf Feb 14 '21 at 12:43
  • Thanks you a lot – Steeven Delucis Feb 14 '21 at 13:02

0 Answers0