id static method
Return the unique identifier for this app installation.
Implementation
static Future<String?> id() async {
if (sID != null) {
return sID;
}
final installFile = await Files.get(FILE_NAME);
try {
// ignore: avoid_slow_async_io
final exists = await installFile.exists();
if (!exists) {
_justInstalled = true;
sID = writeInstallationFile(installFile);
} else {
sID = await readInstallationFile(installFile);
}
} catch (ex) {
sID = '';
}
return sID;
}