{"id":32290389,"url":"https://github.com/kherel/application_version","last_synced_at":"2026-07-09T01:31:01.961Z","repository":{"id":246011818,"uuid":"819834352","full_name":"kherel/application_version","owner":"kherel","description":"application_version package","archived":false,"fork":false,"pushed_at":"2024-06-25T10:21:43.000Z","size":56,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T02:51:32.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kherel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-25T09:34:54.000Z","updated_at":"2025-01-03T08:59:06.000Z","dependencies_parsed_at":"2024-06-25T11:06:54.855Z","dependency_job_id":"ee1f305e-5035-4719-b305-47acea1d0059","html_url":"https://github.com/kherel/application_version","commit_stats":null,"previous_names":["kherel/application_version"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kherel/application_version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherel%2Fapplication_version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherel%2Fapplication_version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherel%2Fapplication_version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherel%2Fapplication_version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kherel","download_url":"https://codeload.github.com/kherel/application_version/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherel%2Fapplication_version/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35283905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-23T02:51:09.514Z","updated_at":"2026-07-09T01:31:01.944Z","avatar_url":"https://github.com/kherel.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# application_version\n\n[![Pub](https://img.shields.io/pub/v/application_version.svg)](https://pub.dartlang.org/packages/application_version)\n\nA Flutter plugin to retrieve the application's version and build number for both Android and iOS.\n\n## Features\n\n- **Get App Version**: Retrieve the app's version and build number.\n- **VersionData Class**:\n  - **Parsing**: Parses version strings and ensures semantic versioning (e.g., \"1.0\" becomes \"1.0.0\").\n  - **Comparison**: Implements `Comparable\u003cVersionData\u003e` interface for comparing versions.\n  - **Equality**: Overrides `==` and `hashCode` for proper equality checks and use in collections.\n  - **String Representation**: Provides a `toString` method to display the version in a readable format.\n\n## Why This Project?\n\nMany developers use the `package_info` package, which provides a wide range of features. However, the extensive functionality of `package_info` comes with many dependencies that can potentially conflict with other packages you use. Therefore, this small package was created to do **just one thing**: show the version of your application. It aims to be lightweight with minimal dependencies, reducing the risk of conflicts.\n\n## Installation\n\nAdd `application_version` as a dependency in your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n application_version: \"^0.0.1\"\n```\n\n### How To Use\n\nImport the following package in your dart file\n\n```dart\nimport 'package:application_version/application_version.dart';\n\n // then you need it:\n VersionData? version = await ApplicationVersion.getVersion();\n```\n\n### VersionData class\n\nThe VersionData class includes methods for comparison, which can be useful in scenarios where you receive a minimum required version for an update from the backend.\n\n```dart\n  final version1 = VersionData.parse('1.2+100');\n  final version2 = VersionData.parse('1.2.0+101');\n  final version3 = VersionData.parse('1.3');\n  final version4 = VersionData.parse('1.2.0')\n\n  print(version1 \u003c version2); // true\n  print(version1 \u003e version3); // false\n  print(version2 \u003e= version1); // true\n  print(version3 \u003c= version2); // false\n  print(version1 == version4); // true The build number is ignored during comparison if one of the objects does not have it.\n\n  // Example of checking if the current version meets the minimum required version\n  final currentVersion = VersionData.parse('2.0.1');\n  final minRequiredVersion = VersionData.parse('2.0.0');\n\n  if (currentVersion \u003e= minRequiredVersion) {\n    print('Current version meets the minimum required version.');\n  } else {\n    print('Current version does not meet the minimum required version.');\n  }\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkherel%2Fapplication_version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkherel%2Fapplication_version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkherel%2Fapplication_version/lists"}