better_uuid 0.1.2 copy "better_uuid: ^0.1.2" to clipboard
better_uuid: ^0.1.2 copied to clipboard

A better uuid package for dart. Create unique IDs without the risk of collisions that other ID generation methods have.

example/example.dart

import 'package:better_uuid/uuid.dart';

class User {
  Uuid id;
  String username;

  User(this.id, this.username);

  User.create(this.username) {
    id = Uuid.v4();
  }
}

void main() {
  var john = User.create("johndoe");
  var james = User.create("james");

  assert(john.id != james.id);
}
1
likes
30
pub points
57%
popularity

Publisher

unverified uploader

A better uuid package for dart. Create unique IDs without the risk of collisions that other ID generation methods have.

Repository
View/report issues

License

BSD-2-Clause (LICENSE)

Dependencies

crypto

More

Packages that depend on better_uuid