I'm trying to implement a visitor-counter on a app built entirely with flutter and I'm trying to accomplish this with nothing but plain dart code and some packages from pub.dev.
But the problem which has been bugging me is that I need to find a way to uniquely identify users based on their devices so that I don't end up incrementing the counter for the same person again and again upon a revisit.
I want to increment the counter on users visiting the news.
So far what I've thought is that I could use firestore for keeping track of the total number of visitors and display the same on the my app with an eye icon.
Is there any better approach to this problem? Any help would be appreciated ??
If there is any solution please provide an example code in flutter of how to implement this
It would of great help.
(ps: I have no prior flutter experience)
question from:
https://stackoverflow.com/questions/65949367/flutter-how-to-implement-news-count-on-a-flutter-app 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…