0 purchases
uid
Generate a unique ID from datetime, convert it to millisecondsSinceEpoch, and combine it with a random position and a string.
Getting started #
Pubspec yaml:
dependencies:
uid: ^0.0.1
copied to clipboard
Import the package:
import 'package:uid/uid.dart';
copied to clipboard
Usage #
//Get unique id from current datetime then convert to milisecond
//and split it at random position and add random string.
//Ex: 4824254606141 quantityOfRandomString=2
//random postion at 4 => 4824 + aF + 254606141
//return 4824aF254606141
var id = UId.getId();//4824 aF 254606141 => 4824aF254606141
var id1 = UId.getId(4); //4824 aZ2F 254606141 => 4824aZ2F254606141
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.