app_version_compare 1.0.0+1 copy "app_version_compare: ^1.0.0+1" to clipboard
app_version_compare: ^1.0.0+1 copied to clipboard

A powerful tool to compare package or app versions.

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
0
points
176
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful tool to compare package or app versions.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on app_version_compare