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

GitHub リポジトリsanmadjack/version_dart

バージョン

Version クラスを提供する Dart ライブラリ

バージョン のプロジェクト画像
スター
46
フォーク
13
最終プッシュ(UTC)
2026/06/12
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

version

version 3.0.2 Tests Coverage Status

A dart library providing a Version object for comparing and incrementing version numbers in compliance with the Semantic Versioning spec at http://semver.org/

This is in contrast to pub_semver, which is close to the spec but diverts in a few specific ways.

Installation

In your pubspec.yaml:

dependencies:
  version: ^3.0.0

Usage

A simple usage example:

import 'package:version/version.dart';

void main() {
  Version currentVersion = new Version(1, 0, 3);
  Version latestVersion = Version.parse("2.1.0");

  if (latestVersion > currentVersion) {
    print("Update is available");
  }

  Version betaVersion = new Version(2, 1, 0, preRelease: ["beta"]);
  // Note: this test will return false, as pre-release versions are considered
  // lesser then a non-pre-release version that otherwise has the same numbers.
  if (betaVersion > latestVersion) {
    print("More recent beta available");
  }
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Matthew Barbour GitHub avatar
GitHub 作者

Matthew Barbour ↗

言語DartShell

使用している依存関係

依存関係一覧 1 件

  • test開発用^1.16.3

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗