app_version_compare 1.0.3 copy "app_version_compare: ^1.0.3" to clipboard
app_version_compare: ^1.0.3 copied to clipboard

This Dart package offers a comprehensive utility for handling version strings in accordance with Semantic Versioning (SemVer) standards.

example/app_version_compare_example.dart

import 'package:app_version_compare/app_version_compare.dart';

void main() {
  final remoteConfigVersion = '1.2.4';
  final appVersion = '1.2.3';

  final remoteVersion = AppVersion.fromString(remoteConfigVersion);
  final appCurrentVersion = AppVersion.fromString(appVersion);

  if (appCurrentVersion >= remoteVersion) {
    print('The app is updated!');
    print('Current app version: $appCurrentVersion');
    print('Latest version available: $remoteVersion');
  } else {
    print('The app is out of date!');
    print('Current app version: $appCurrentVersion');
    print('Latest version available: $remoteVersion');
  }
}
6
likes
160
points
251
downloads

Publisher

unverified uploader

Weekly Downloads

This Dart package offers a comprehensive utility for handling version strings in accordance with Semantic Versioning (SemVer) standards.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on app_version_compare