Skip to content

Sticks/teamhydra_id_generator

master
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?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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
}

About

A dart pacakge for the Team Hydra ID Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages