Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
274 views
in Technique[技术] by (71.8m points)

firebase - Flutter - How to implement News Count on a flutter app

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have an idea unique users can be identified by the imei number

use this plugin to the imei number https://pub.dartlang.org/packages/imei_plugin

based on imei number you can keep track of the visitors.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...