app_version_details 0.0.1
app_version_details: ^0.0.1 copied to clipboard
A simple 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 Flutter plugin to retrieve the app's version name and build number on both Android and iOS.
Getting Started #
Add this to your package's pubspec.yaml file:
dependencies:
app_version_details: ^0.0.1
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 AppVersionInfo.getAppVersion();
print("App Version: $version");
}
Example Output: #
1.0.0+100
Where:
1.0.0is the version name.100is the build number.
Call getAppVersionName() to fetch the app version number:
void main() async {
String? versionName = await AppVersionInfo.getAppVersionName();
print("App Version Name: $versionName");
}
Example Output: #
1.0.0
Call getAppBuildNumber() to fetch the app build number:
void main() async {
String? buildNumber = await AppVersionInfo.getAppBuildNumber();
print("App Build Number: $buildNumber");
}
Example Output: #
100
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!