패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.1.0

sane_uuid

RFC4122에 따라 v1, v4 및 v5 UUID 생성 및 처리를 지원하는 합리적인 UUID 구현.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.4만
좋아요
4
Pub 점수
160

패키지 설치

flutter pub add sane_uuid

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Dart 및 Flutter용 깔끔하고 간단한 UUID 라이브러리로, RFC4122 사양을 준수합니다. 버전 1, 4, 5 UUID의 생성과 파싱을 간단하고 직관적인 API로 지원합니다. 모든 주요 플랫폼에서 신뢰할 수 있고 사용하기 쉬우며, 고유 식별자가 필요한 애플리케이션에서 일관된 UUID 처리를 보장합니다. 불필요한 복잡성 없이 명확성과 정확성을 중시합니다.

사용 사례

  • 사용자 세션에 대한 고유 ID 생성
  • 데이터베이스에서 지속 가능한 식별자 만들기
  • 보안 토큰 생성 구현
  • 장치 간 데이터 동기화
  • 크로스 플랫폼 앱에서 UUID 처리

주요 기능

  • UUID 버전 1, 4 및 5를 지원합니다
  • RFC4122 준수
  • 간단하고 읽기 쉬운 API
  • 크로스 플랫폼 호환성
  • 강력한 구문 분석 및 검증
  • 경량이며 종속성 없음

적합한 대상

  • 고유 식별자가 필요한 앱
  • UUID를 사용하는 백엔드 서비스
  • 데이터 동기화 기능
  • 안전한 인증 시스템
  • 다중 플랫폼 개발

고려 사항

  • UUID 버전 3를 지원하지 않습니다
  • 표준 UUID 형식에 제한됨
  • 구문 분석 외에 내장된 UUID 검증 유틸리티는 없습니다
  • 고성능 대량 UUID 생성을 위한 설계가 아님

원본 README

연결된 소스 저장소의 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.

카테고리

의존성

의존성 목록 2 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.