package_info_plus 0.6.1 copy "package_info_plus: ^0.6.1" to clipboard
package_info_plus: ^0.6.1 copied to clipboard

outdated

Flutter plugin for querying information about the application package, such as CFBundleVersion on iOS or versionCode on Android.

PackageInfoPlus #

Flutter Community: package_info_plus

pub package

This Flutter plugin provides an API for querying information about an application package.

Usage #

You can use the PackageInfo to query information about the application package. This works both on iOS and Android.

import 'package:package_info_plus/package_info_plus.dart';

PackageInfo packageInfo = await PackageInfo.fromPlatform();

String appName = packageInfo.appName;
String packageName = packageInfo.packageName;
String version = packageInfo.version;
String buildNumber = packageInfo.buildNumber;

Or in async mode:

PackageInfo.fromPlatform().then((PackageInfo packageInfo) {
  String appName = packageInfo.appName;
  String packageName = packageInfo.packageName;
  String version = packageInfo.version;
  String buildNumber = packageInfo.buildNumber;
});

Known Issue #

As noted on issue 20761, package_info on iOS requires the Xcode build folder to be rebuilt after changes to the version string in pubspec.yaml. Clean the Xcode build folder with: XCode Menu -> Product -> (Holding Option Key) Clean build folder.

Issues and feedback #

Please file issues to send feedback or report a bug. Thank you!

2346
likes
0
pub points
100%
popularity

Publisher

verified publisherfluttercommunity.dev

Flutter plugin for querying information about the application package, such as CFBundleVersion on iOS or versionCode on Android.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, package_info_plus_macos, package_info_plus_platform_interface, package_info_plus_web, package_info_plus_windows

More

Packages that depend on package_info_plus