AppInfo class

Information about an installed app on the device.

Contains metadata like package name, version, install times, and optional icon data.

Constructors

AppInfo({String? packageName, String? appName, String? versionName, int? versionCode, int? uid, String? apkPath, int? apkSizeBytes, String? dataPath, bool? isOnExternalStorage, DateTime? firstInstallTime, DateTime? lastUpdateTime, bool? isSystem, Uint8List? iconBytes, int? category, int? targetSdkVersion, int? minSdkVersion, bool? enabled, String? processName, int? installLocation})
Creates an AppInfo with the specified properties.
const
AppInfo.fromMap(Map<String, Object?> m)
Creates an AppInfo from a map of key-value pairs.
factory

Properties

apkPath → String?
Full path to the base APK file (Android ApplicationInfo.sourceDir).
final
apkSizeBytes → int?
APK size in bytes (base APK + split APK files when present).
final
appName → String?
The human-readable display name of the app.
final
category → int?
App category (Android ApplicationInfo.category, API 26+). Raw int from platform. Null when not set or API < 26.
final
dataPath → String?
Full path to the app's private data directory (Android ApplicationInfo.dataDir).
final
enabled → bool?
Whether the app is enabled (Android ApplicationInfo.enabled).
final
firstInstallTime → DateTime?
The date and time when the app was first installed on the device.
final
hashCode → int
The hash code for this object.
no setterinherited
iconBytes → Uint8List?
The app icon as raw bytes, if requested and available.
final
installLocation → int?
Install location (Android PackageInfo.installLocation).
final
isOnExternalStorage → bool?
Raw Android flag from ApplicationInfo.FLAG_EXTERNAL_STORAGE.
final
isSystem → bool?
Whether the app is a system app (preinstalled) or user-installed.
final
lastUpdateTime → DateTime?
The date and time when the app was last updated.
final
minSdkVersion → int?
Min SDK version (Android ApplicationInfo.minSdkVersion).
final
packageName → String?
The unique package name identifier for the app (e.g., 'com.example.app').
final
processName → String?
Process name (Android ApplicationInfo.processName).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
targetSdkVersion → int?
Target SDK version (Android ApplicationInfo.targetSdkVersion).
final
uid → int?
Linux/kernel-level UID assigned to the app on the device.
final
versionCode → int?
The internal version code used for version comparison.
final
versionName → String?
The version name as displayed to users (e.g., '1.0.0').
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