パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細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 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。