pub_updater 0.5.0 copy "pub_updater: ^0.5.0" to clipboard
pub_updater: ^0.5.0 copied to clipboard

A Dart package which enables checking whether a package is up to date.

Pub Updater #

Very Good Ventures Very Good Ventures

Developed with 💙 by Very Good Ventures 🦄

Pub build coverage style: very good analysis License: MIT


A Dart package which enables checking whether packages are up to date and supports updating them.

Intended for use in CLIs for prompting users to auto-update.

Usage #

import 'package:pub_updater/pub_updater.dart';

void main() async {
  // Create an instance of PubUpdater
  final pubUpdater = PubUpdater();

  // Check whether or not version 0.1.0 is the latest version of my_package
  final isUpToDate = await pubUpdater.isUpToDate(
    packageName: 'my_package',
    currentVersion: '0.1.0',
  );

  // Trigger an upgrade to the latest version if my_package is not up to date
  if (!isUpToDate) {
    await pubUpdater.update(packageName: 'my_package');
  }

  // You can also query the latest version available for a specific package.
  final latestVersion = await pubUpdater.getLatestVersion('my_package');
}
63
likes
160
points
871k
downloads

Publisher

verified publisherverygood.ventures

Weekly Downloads

A Dart package which enables checking whether a package is up to date.

Repository (GitHub)
View/report issues

Topics

#cli #pub #version

Documentation

API reference

License

MIT (license)

Dependencies

http, json_annotation, process, pub_semver

More

Packages that depend on pub_updater