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

A lightweight plugin to fetch the app version across android and ios platforms. Useful for displaying version info in your app or checking for updates.

App Version Details #

A lightweight alternative for retrieving the app's version, build number and packagename on Android and iOS, replacing the package_info_plus plugin, which adds multiple dependencies under the hood and increases app size.

Getting Started #

Add this to your package's pubspec.yaml file:

dependencies:
  app_version_details: ^1.0.3

Usage #

First, import the package:

import 'package:app_version_details/app_version_details.dart';

Then, call getAppVersion() to fetch the app version:

void main() async {
  String? version = await AppVersionDetails().getAppVersion();
  print("$version");
}

Example Output: #

1.0.0+100

Where:

  • 1.0.0 is the version name.
  • 100 is the build number.

Call getVersionName() to fetch the app version name:

void main() async {
  String? versionName = await AppVersionDetails().getVersionName();
  print("$versionName");
}

Example Output: #

1.0.0

Call getBuildNumber() to fetch the app build number:

void main() async {
  String? buildNumber = await AppVersionDetails().getBuildNumber();
  print("$buildNumber");
}

Example Output: #

100

Call getPackageName() to fetch the package-name:

void main() async {
  String? name = await AppVersionDetails().getPackageName();
  print("$name");
}

Example Output: #

com.example.package

Contributing #

Pull requests are welcome! If you have any major changes in mind, please open an issue first to discuss them.

Made with ❤️ for Flutter developers!

1
likes
150
points
84
downloads

Publisher

verified publishersivaprasadnk.dev

Weekly Downloads

A lightweight plugin to fetch the app version across android and ios platforms. Useful for displaying version info in your app or checking for updates.

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on app_version_details