Permalink
Cannot retrieve contributors at this time
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?
teamhydra_id_generator/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
38 lines (27 sloc)
1.21 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
} | |
``` |