Bet ID

A tiny, secure, unique identifier generator for Dart.

  • EASY - Simple entry design, less necessary APIs are exposed.
  • FAST - Generate a unique ID in a single line of code.
  • SECURE - Generates a unique ID that is hard to guess.
import 'package:betid/betid.dart';

/// Generate a sized of 21 characters unique ID.
final String id = 21.betid;

Table of Contents

  1. Installation
  2. Usage
  3. APIs
  4. License


$ dart pub add betid

# Or if you using Flutter
$ flutter pub add betid


Use the betid function to generate a unique ID.

final String id = betid();

/// If you want to generate a ID with size of `21` characters.
final String id2 = betid(21);

If you want to generate a unique ID with custom alphabet.

final String customAlphabet = 'abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ-1234567890';
final String id = customAlphabet.betid();

Can you use the sized ID?

final String id = 21.betid;



  • betid, Parameter: size


  • for String type, .betid
  • for int type:
    1. .betid
    2. .customAlphabetBetid(String alphabet)


BSD 3 Clause License, Copyright (c) 2022 Odroe Inc.


Support for doing something awesome.