butterfly_flutter

Creator: coderz1093

Last updated:

0 purchases

butterfly_flutter Image
butterfly_flutter Images

Languages

Categories

Add to Cart

Description:

butterfly flutter

This is a package for generating id.
Features #
This package generates 19 bytes id by timestamp and the machine number. The timestamp should be millisecond format. But the machine number just decided by what you want.
The construction of id is like this:

timeStampSize = 41;
highSequenceSize = 8;
machineSize = 13;
lowSequenceSize = 1;

Usage #
// get generator instance by timestamp and machine number
var generator = Butterfly(DateTime.now().millisecondsSinceEpoch, 0);
// generate one id
int id = generator.generate();
// generate specified number of ids
List<int> ids = generator.batchGenerate(10);
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.