I am trying to make a app which uses the refer and earn system in which i want to assign the 6 digit unique code to each user. Is there any method which can create the 6 digit unique alphanumeric code to each user.
Asked
Active
Viewed 1,054 times
-1
-
If by chance you are using firebase and are open to a id longer than 6 digits you can use the logged in user's uid. – Arsh Shaikh Aug 18 '20 at 16:55
1 Answers
0
You can either refer to this answer How to generate random string in dart?
Or if you are open to a legitimate solution but compromise over its length of six, I highly recommend you to please use uuid https://pub.dev/packages/uuid

Ravi Garg
- 1,378
- 12
- 23