FLUTTER ECOSYSTEM

BjoernPetersen/sane_uuid

합리적인 인터페이스를 갖춘 UUID 생성 및 분석

sane_uuid 프로젝트 이미지
Stars
4
Forks
2
최근 푸시(UTC)
2026. 9. 18.
프로젝트 상태
활성
Björn Petersen GitHub avatar
GITHUB User

Björn Petersen ↗

Cloud Backend Engineer @cosee

cosee GmbHHusum, Germany
언어Dart

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

sane_uuid

codecov

A properly designed, efficient UUID library for Dart.

  • Supports v1, v4, v5 and v6 generation
  • Immutable Uuid type with equality, comparison and accessors for properties defined by RFC 4122
    • The internal representation of the UUID is a byte array, not a String
  • Support for all syntactically correct UUIDs (regardless of RFC4122 semantics)

Usage

A simple usage example:

import 'package:sane_uuid/uuid.dart';

// randomly generated using secure random number generator
final Uuid randomUuid = Uuid.v4();
// Prints properly formatted UUID, e.g.: a8796ef4-8767-4cd0-b432-c5e93ba120df
print(randomUuid);

// parse any common UUID string
final parsedUuid = Uuid.fromString(
  'a8796ef4-8767-4cd0-b432-c5e93ba120df',
);

// hyphens and capitalization don't matter
final parsedUuidDifferentFormatting = Uuid.fromString(
    'A8796EF487674CD0B432C5E93BA120DF',
);

// UUID objects with the same data are actually equal
assert(parsedUuid == parsedUuidDifferentFormatting);

For more examples, see the examples page.

Features and bugs

Please file feature requests and bugs at the issue tracker.

License

This project is released under the MIT License. That includes every file in this repository, unless explicitly stated otherwise at the top of a file. A copy of the license text can be found in the LICENSE file.