Search packages, repositories and app categories

Package detailsv3.0.0

version_tracker

Local version and build tracker plugin. Provides the ability to keep track of previous installations and easily migrate data between upgrades.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
199
Likes
48
Pub points
140

Install package

flutter pub add version_tracker

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Version Tracker is a Flutter plugin that helps developers monitor local app version and build numbers across installations. It enables tracking of previous versions, facilitating seamless data migration during app upgrades. By storing version history locally, it supports intelligent handling of state transitions between releases, ensuring users retain data when upgrading. Ideal for apps requiring upgrade-aware logic or configuration changes based on version changes.

Use cases

  • Handling data migration between app versions
  • Detecting first-time app launches
  • Managing configuration changes per version
  • Supporting feature flags based on version
  • Tracking user journey across app updates
  • Enabling rollback-safe state management

Key features

  • Tracks previous app versions and builds
  • Stores version history persistently
  • Provides callbacks for version changes
  • Supports cross-platform usage
  • Simple API for version checks
  • Facilitates upgrade-aware app behavior

Suitable for

  • Apps needing upgrade logic
  • Developers managing data migration
  • Projects with version-dependent features
  • Apps requiring launch detection
  • Teams using feature flagging
  • Cross-platform apps with version awareness

Considerations

  • Requires persistent storage access
  • Does not handle remote version checks
  • Limited to local version tracking
  • No built-in update prompts
  • Not suitable for cloud-based version sync
  • Manual implementation needed for complex migration rules

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Pub Version GitHub

VersionTracker

Local version and build tracker plugin. Provides the ability to keep track of previous installations and easily migrate data between upgrades.

Usage

Call this on the main function

var vt = VersionTracker();
await vt.track();

You can also set the max number for version and build history by giving a value to buildHistoryMaxLength and versionHistoryMaxLength in the track function.

var vt = VersionTracker();
await vt.track(buildHistoryMaxLength: 10, versionHistoryMaxLength: 10);

Then call these whenever you want (in these examples the user has launched a bunch of previous versions, and this is the first time he's launched the new version 1.0.11):

vt.isFirstLaunchEver;        // false
vt.isFirstLaunchForVersion;  // true
vt.isFirstLaunchForBuild;    // true

vt.currentVersion;           // 1.0.11
vt.previousVersion;          // 1.0.10
vt.firstInstalledVersion;    // 1.0.0
vt.versionHistory;           // [ 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.10, 1.0.11 ]

vt.currentBuild;             // 18
vt.previousBuild;            // 15
vt.firstInstalledBuild;      // 1
vt.buildHistory;             // [ 1, 2, 3, 4, 5, 8, 9, 10, 11, 13, 15, 18 ]

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package