teamhydra_id_generator
This package allows you to generate unique and random IDs for your Flutter/dart applications using the ID generator provided by team hydra.
Features
This generator provides the following ID types:
- UUIDv4 generation
- NanoID generation (with and without custom alphabet)
- Word generation
- 2FA generation
- Keypair generation
- Snowflake generation (discord-like snowflake)
- License key generation
Getting started
You will need a valid username and token to use this package. If you do not have one and would like to use this package, please contact us on our discord server in the #other-support
channel and someone will assist you.
Usage
You can see an example in the /example folder, but a simple example is shown below:
// Import the package
import 'package:teamhydra_idgen/teamhydra_idgen.dart';
void main() async {
IDGen idgen = IDGen(username: 'your_username', token: 'your_token');
// Generate a new ID, in this example we are generating a UUID V4
IDGenResponse uuid =
await idgen.generateUUIDV4(); // all generations are async
print('Generated UUID: ${uuid.id}'); // print the generated ID
}