CATEGORIES
>>
Dart(2)
>>
Errors(5)
>>
Android(11)
>>
Errors(1)
>>
Errors(2)
>>
Windows 8(3)
>>
iPhone7(1)
>>
Errors(4)
>>
Html(1)
RECOMMENDED SITES
Flutter get app install date
How to find current application install time or date on Flutter.
For this we are using device_apps library. https://pub.dev/packages/device_apps
We are using 3 library.
- intl lib from DateFormat
- package_info from PackageInfo.packageName
- device_apps from installTimeMillis
For this we are using device_apps library. https://pub.dev/packages/device_apps
We are using 3 library.
- intl lib from DateFormat
- package_info from PackageInfo.packageName
- device_apps from installTimeMillis
Future<String> getAppInstallDate(String dateFormat) async {
/**package_info: https://pub.dev/packages/package_info**/
PackageInfo packageInfo = await PackageInfo.fromPlatform();
/** device_apps: https://pub.dev/packages/device_apps **/
Application app = await DeviceApps.getApp(packageInfo.packageName);
var date = new DateTime.fromMicrosecondsSinceEpoch(app.installTimeMillis);
/** intl: https://pub.dev/packages/intl **/
var dFormat = DateFormat(dateFormat);
return dFormat.format(date);
}
Author: Engin ATALAY
Date: 10.01.2021 19:37:37
View Count: 1710
COMMENTS
No comments yet. Be the first to comment who you are.