min_id 1.0.3
min_id: ^1.0.3 copied to clipboard
ID generator for dart easily like eat 🥮🥮🥮🥮. You can generate unique string, unique number, unique any thing by min_id 👍.
min_id #
Id generator for dart
Getting Start ✈ #
dependencies:
min_id: ^1.0.3
Install it
flutter pub get
default
format 🏮
import 'package:min_id/min_id.dart;
final id = MinId.getId();
print(id);// abc-qwe-rty-xzy
- Custom format ✂
import 'package:min_id/min_id.dart;
final id = MinId.getId('{3d}-{3w}-xyz');
print(id);//128-bca-xyz
- Custom global format 🌏
import 'package:min_id/min_id.dart;
MinId.withFormat('{3d}-{3w}-xyz');
final id = MinId.getId();
print(id);//128-bca-xyz
Document 📝 #
Syntax ⚔
Syntax | Range | Description | version |
---|---|---|---|
abc | ___ | Return string abc |
^1.0.0 |
{d} | [0 - 9] | Pick random 1 character from 0 -> 9 |
^1.0.0 |
{w} | [a - z] or [A - Z] | Pick random 1 character from letter string |
^1.0.0 |
{.} | [0x0021 - 0x007f] | Pick random 1 character from 0x0021 -> 0x007f in UTF8 charset |
^1.0.0 |
(abc) | [a - c] | Pick random 1 character from a -> c (abc from input user) |
^1.0.0 |
{2(abc)} | [a - c] | Pick random 2 characters from a -> c |
^1.0.0 |
{2{d}} | [0 - 9] | Pick random 2 character from 0 -> 9 |
^1.0.0 |
(abc{d}) | [a -> c] or [0 - 9] | Nested random: + Step 1: Pick random 1 character in number range+ Step 2: Pick random 1 character in a -> c or result in step 1 |
^1.0.0 |