PackageArchiveInfo class

Application metadata. Provides .apk package information on Android. Non-support .ipa

PackageInfo packageInfo = await PackageArchiveInfo.fromPath('File path.apk')
print("Version is: ${packageInfo.version}");
Inheritance
  • Object
  • PackageInfo
  • PackageArchiveInfo

Constructors

PackageArchiveInfo({required String appName, required String packageName, required String version, required String buildNumber})
Constructs an instance with the given values for testing. PackageArchiveInfo instances constructed this way won't actually reflect any real information from the platform, just whatever was passed in at construction time.

Properties

appName String
The app name. CFBundleDisplayName on iOS, application/label on Android.
finalinherited
buildNumber String
The build number. CFBundleVersion on iOS, versionCode on Android.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
packageName String
The package name. bundleIdentifier on iOS, getPackageName on Android.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String
The package version. CFBundleShortVersionString on iOS, versionName on Android.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromPath(String path) Future<PackageArchiveInfo>
Retrieves package information from the local file.