PackageInfo
Package metadata of the running application, as returned by
Page.get_package_info.
For an app packaged with flet build, version and
build_number are the values the app was built with: the
--build-version and --build-number options, falling back to
project.version (or tool.poetry.version) and tool.flet.build_number
in pyproject.toml, and then to the defaults 1.0.0 and 1.
Metadata comes from the Flutter client that renders the app, not from
the Python program. When the app is not packaged with flet build, it
describes that client:
flet run- the Flet desktop client.flet run --androidor--ios- the Flet app on the device that runs the program.- Web (
flet run --web, a web server, orflet publish) - the Flet web client, read from itsversion.json. Aflet build webapp returns its own metadata.
Values that a platform doesn't provide are empty strings, or None
for optional fields.
Properties
app_name- The application name shown to users.build_number- The build number, an internal version identifier, for example"42".build_signature- The SHA-256 signature (hex) of the key the app was signed with.install_time- The time the application was installed.installer_store- Identifies the store the application was installed from.package_name- The application's package or bundle identifier.update_time- The time the application was last updated.version- The application version shown to users, for example"1.2.3".
Properties
app_nameinstance-attribute
app_name: strThe application name shown to users.
- iOS/macOS -
CFBundleDisplayName, falling back toCFBundleName. - Android -
application/labelinAndroidManifest.xml. - Web/Linux -
app_namefrom the build'sversion.json. - Windows -
ProductNameof the executable.
build_numberinstance-attribute
build_number: strThe build number, an internal version identifier, for example "42".
- iOS/macOS -
CFBundleVersion. On iOS, it equalsversionwhen the app has no build number. - Android -
versionCode. - Web/Linux -
build_numberfrom the build'sversion.json. - Windows - the build number part of the executable's
ProductVersion.
build_signatureinstance-attribute
build_signature: strThe SHA-256 signature (hex) of the key the app was signed with.
Android only; an empty string on other platforms.
install_timeclass-attributeinstance-attribute
install_time: datetime | None = NoneThe time the application was installed.
- Android -
PackageManager.firstInstallTime. - iOS - creation time of the app's documents directory.
- macOS - creation time of the app's documents directory when sandboxed, otherwise the last modification time of the app bundle.
- Windows/Linux - creation time of the app executable, falling back to its last modification time.
- Web -
None.
installer_storeclass-attributeinstance-attribute
installer_store: str | None = NoneIdentifies the store the application was installed from.
- Android - package name of the installer, for example
"com.android.vending"for Google Play;Noneif the app was sideloaded. - iOS -
"com.apple","com.apple.testflight"for TestFlight builds, or"com.apple.simulator"in the iOS Simulator. - Other platforms -
None.
package_nameinstance-attribute
package_name: strThe application's package or bundle identifier.
- iOS/macOS - bundle identifier, for example
"com.mycompany.myapp". - Android -
applicationId, for example"com.mycompany.myapp". - Web/Linux -
package_namefrom the build'sversion.json. - Windows -
InternalNameof the executable.
update_timeclass-attributeinstance-attribute
update_time: datetime | None = NoneThe time the application was last updated.
- Android -
PackageManager.lastUpdateTime. - iOS/macOS - last modification time of the app bundle.
- Windows/Linux - last modification time of the app executable.
- Web -
None.
versioninstance-attribute
version: strThe application version shown to users, for example "1.2.3".
- iOS/macOS -
CFBundleShortVersionString. - Android -
versionName. - Web/Linux -
versionfrom the build'sversion.json. - Windows -
ProductVersionof the executable, without the build number.