diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-06-02 22:17:22 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-06-02 22:17:22 +0530 |
| commit | c285f8e733d448555209f95fd76eedbeef5d9e24 (patch) | |
| tree | e28137a9fa79ba4c8e721df9877d0ee4671f4973 /lib/pages/Apps.dart | |
| parent | c60b58a16662fb33121e94b05cc1c868d8f3f16d (diff) | |
| download | daft-launcher-c285f8e733d448555209f95fd76eedbeef5d9e24.tar.gz daft-launcher-c285f8e733d448555209f95fd76eedbeef5d9e24.zip | |
Adds application list component in apps view
Diffstat (limited to 'lib/pages/Apps.dart')
| -rw-r--r-- | lib/pages/Apps.dart | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/pages/Apps.dart b/lib/pages/Apps.dart index 3322c0b..7252aae 100644 --- a/lib/pages/Apps.dart +++ b/lib/pages/Apps.dart @@ -1,9 +1,33 @@ import 'package:flutter/material.dart'; +import 'package:device_apps/device_apps.dart'; + +import '../components/FixedContainer.dart'; +import '../components/SearchableAppList.dart'; class AppsView extends StatelessWidget { + Future<List<Application>> appListF = DeviceApps.getInstalledApplications( + includeSystemApps: false, + onlyAppsWithLaunchIntent: true, + ); + + void openApp(Application app) { + DeviceApps.openApp(app.packageName); + } + + void openOptionsMenu(Application app) { + debugPrint('Wow'); + } + @override Widget build(BuildContext ctx) { - return Text('Apps'); + return FixedContainer( + padding: const EdgeInsets.symmetric(vertical: 36.0, horizontal: 16.0), + child: SearchableAppList( + appListF: appListF, + openApp: openApp, + openOptionsMenu: openOptionsMenu, + ), + ); } } |
