Skip to content
Permalink
63ca17b99c
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
38 lines (27 sloc) 1.21 KB
# 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](https://teamhydra.dev/).
## 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](https://discord.gg/zira) 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:
```dart
// 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
}
```