blob: c0f8f32c8cb5c5039c466a2d093a9bc9bd1d8d0c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import 'package:device_apps/device_apps.dart';
import 'dart:async';
StreamController<List<Application>> applications_$ = StreamController<List<Application>>.broadcast();
Future<List<Application>> getApplications() {
return DeviceApps.getInstalledApplications(
includeSystemApps: true,
onlyAppsWithLaunchIntent: true,
includeAppIcons: false,
);
}
void refreshApplications() async {
List<Application> apps = await getApplications();
applications_$.add(apps);
}
Stream<List<Application>> getApplications$() {
return applications_$.stream;
}
|