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.
final
- buildNumber → String
-
The build number.
Generated from the version in
pubspec.yaml
.final - buildSignature → String
-
The build signature.
SHA-256 signing key signature (hex) on Android.
Empty string on all the other platforms.
final
-
data
→ Map<
String, dynamic> -
Gets a map representation of the PackageInfo instance.
no setter
- hashCode → int
-
Overwrite hashCode for value equality
no setteroverride
- installerStore → String?
-
The installer store. Indicates through which store this application was installed.
final
- packageName → String
-
The package name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → String
-
The package version.
Generated from the version in
pubspec.yaml
.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
Overwrite equals for value equality
override
Static Methods
-
fromPlatform(
{String? baseUrl}) → 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, String? installerStore}) → void - Initializes the application metadata with mock values for testing.