Skip to content

Commit 45996ad

Browse files
authored
chore(package_info_plus): Update InstallerStore description in the README.md
Updated README.md to clarify installerStore information for various platforms.
1 parent 115e12f commit 45996ad

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

  • packages/package_info_plus/package_info_plus

packages/package_info_plus/package_info_plus/README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,16 @@ String version = packageInfo.version;
4848
String buildNumber = packageInfo.buildNumber;
4949
```
5050

51-
## Installer Store
51+
### Installer Store
5252

5353
The `installerStore` property indicates which app store installed the application. This is useful for directing users to the appropriate store page for ratings or updates.
5454

5555
```dart
56+
PackageInfo packageInfo = await PackageInfo.fromPlatform();
5657
String? installerStore = packageInfo.installerStore;
5758
```
5859

59-
### iOS
60+
#### iOS
6061

6162
On iOS, the `installerStore` value is determined by checking the app store receipt path:
6263

@@ -66,7 +67,7 @@ On iOS, the `installerStore` value is determined by checking the app store recei
6667
| TestFlight | `com.apple.testflight` |
6768
| Simulator | `com.apple.simulator` |
6869

69-
### Android
70+
#### Android
7071

7172
On Android, the value is the package name of the app store that installed the application, obtained via `PackageManager.getInstallSourceInfo()` (Android 11+) or `PackageManager.getInstallerPackageName()` (older versions).
7273

@@ -83,13 +84,9 @@ On Android, the value is the package name of the app store that installed the ap
8384

8485
**Note:** Some stores may not properly implement the installer package name API, which could result in `null` being returned even for store installations.
8586

86-
### macOS
87-
88-
On macOS, `installerStore` always returns `null` as there is no reliable way to detect the installation source.
89-
90-
### Other Platforms
87+
#### Other Platforms
9188

92-
On Linux, Windows, and Web, `installerStore` returns `null`.
89+
On MacOS, Linux, Windows, and Web, `installerStore` returns `null`.
9390

9491
## Known Issues
9592

0 commit comments

Comments
 (0)