PackageInfo class

Application metadata. Provides application bundle information on iOS and application package information on Android.

Constructors

PackageInfo({required String appName, required String packageName, required String version, required String buildNumber, String buildSignature = '', String? installerStore})
Constructs an instance with the given values for testing. PackageInfo 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.
final
buildNumber String
The build number. CFBundleVersion on iOS, versionCode on Android.
final
buildSignature String
The build signature. Empty string on iOS, signing key signature (hex) on Android.
final
hashCode int
The hash code for this object.
no setterinherited
installerStore String?
The installer store. Indicates through which store this application was installed.
final
packageName String
The package name. bundleIdentifier on iOS, getPackageName on Android.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String
The package version. CFBundleShortVersionString on iOS, versionName on Android.
final

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

fromPlatform() Future<PackageInfo>
Retrieves package information from the platform. The result is cached.
setMockInitialValues({required String appName, required String packageName, required String version, required String buildNumber, required String buildSignature, required String? installerStore}) → void
Initializes the application metadata with mock values for testing.