uid 0.0.2 copy "uid: ^0.0.2" to clipboard
uid: ^0.0.2 copied to clipboard

Generate a unique ID from datetime, convert it to millisecondsSinceEpoch, and combine it with a random position and a string.

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

Import the package:

import 'package:uid/uid.dart';

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
10
likes
160
points
479
downloads

Publisher

unverified uploader

Weekly Downloads

Generate a unique ID from datetime, convert it to millisecondsSinceEpoch, and combine it with a random position and a string.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on uid