Skip to content
pubscout

pub_updater

0.6.0, released 3 months ago by verygood.ventures

Checks if a pub package is up to date and can trigger updates

$ flutter pub add pub_updater
Source repository

What it does

PubUpdater queries pub.dev for the latest version of a package and compares it to a supplied current version. It can also run the update command to bring a package to its latest release.

AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a CLI tool to verify package versions during development or CI
  • You want to prompt users to upgrade dependencies automatically

Skip it when

  • You need a full dependency management solution beyond simple version checks
  • You require integration with other package managers

Strengths

  • Simple API, no code generation
  • Supports Dart 3.12 and newer
  • Handles pre-release and stable releases correctly
  • No build_runner or codegen required

Weaknesses

  • Only works with pub.dev or self-hosted pub servers
  • Limited to Dart packages, not Flutter plugins with platform code

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
4

Add dependency to pubspec and import 'package:pub_updater/pub_updater.dart'; no special permissions or build steps

import 'package:pub_updater/pub_updater.dart';

void main() async {
  final updater = PubUpdater();
  final upToDate = await updater.isUpToDate(packageName: 'my_package', currentVersion: '0.1.0');
  if (!upToDate) await updater.update(packageName: 'my_package');
}

Alternatives

Packages that do the same job and could replace pub_updater.

  • cli_launcher

    Utility to launch a locally installed version of a CLI when a global version is invoked.

  • dartdosh

    Flutter build and release CLI to automate version bumping, file naming, and uploads.

Works with

Packages commonly used together with pub_updater: ones it builds on, ones built on it, and its own family.