getApps method

  1. @override
Future<List<AppInfo>> getApps({
  1. bool includeSystemApps = false,
})
override

Implementation

@override
Future<List<AppInfo>> getApps({bool includeSystemApps = false}) async {
  try {
    final List<dynamic> result = await methodChannel.invokeMethod('getApps', {
      "includeSystemApps": includeSystemApps,
    });
    List<AppInfo> ourApps =
        result.map((e) => AppInfo.fromAndroidData(e)).toList();
    return ourApps;
  } catch (err) {
    throw Exception("Can't get the applications: $err");
  }
}