From f4fc9576aa77045d3b6c26263a7200af0c8b6151 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 5 Jun 2020 21:55:06 +0530 Subject: refactors application data to use streams --- lib/pages/Apps.dart | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'lib/pages/Apps.dart') diff --git a/lib/pages/Apps.dart b/lib/pages/Apps.dart index 97d2dbc..f221d27 100644 --- a/lib/pages/Apps.dart +++ b/lib/pages/Apps.dart @@ -9,21 +9,16 @@ import '../data/favorites.dart'; class AppsView extends StatelessWidget { void Function(Application) openApp; void Function(BuildContext, Application) openOptionsMenu; - - AppsView({ this.openApp, this.openOptionsMenu }): super(); + List appList; - Future> appListF = DeviceApps.getInstalledApplications( - includeSystemApps: true, - onlyAppsWithLaunchIntent: true, - includeAppIcons: false, - ); + AppsView({ this.appList, this.openApp, this.openOptionsMenu }): super(); @override Widget build(BuildContext ctx) { return FixedContainer( padding: const EdgeInsets.symmetric(vertical: 36.0, horizontal: 16.0), child: SearchableAppList( - appListF: appListF, + appList: appList, openApp: openApp, openOptionsMenu: (app) => openOptionsMenu(ctx, app), ), -- cgit v1.3.1