appUsageData method

Future<List<AppUsage>> appUsageData({
  1. DateTime? startTime,
  2. DateTime? endTime,
  3. UsageInterval usageInterval = UsageInterval.daily,
  4. List<String>? packagesName,
})

Fetch app usage data from the device.

Returns a map with the following keys:

  • status: Whether the data was successfully fetched.
  • data: Map of app bundle IDs to usage data.
  • error: Error message if the data fetch failed.

Implementation

Future<List<AppUsage>> appUsageData({
  DateTime? startTime,
  DateTime? endTime,
  UsageInterval usageInterval = UsageInterval.daily,
  List<String>? packagesName,
}) {
  throw UnimplementedError('appUsageData() has not been implemented.');
}