aboutsummaryrefslogtreecommitdiff
path: root/lib/pages/Home.dart
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2020-06-04 00:41:06 +0530
committerAkshay Nair <phenax5@gmail.com>2020-06-04 00:41:06 +0530
commit5c4149b723ccf685e3a7065bebcacd6341571ed1 (patch)
treefa304d39ec56d603a42aa97c1119879366f1b3f2 /lib/pages/Home.dart
parent133098d9a3b220cacf3d5ee539c65252764cb967 (diff)
downloaddaft-launcher-5c4149b723ccf685e3a7065bebcacd6341571ed1.tar.gz
daft-launcher-5c4149b723ccf685e3a7065bebcacd6341571ed1.zip
Adds remove from favorites + context menu for favorites items
Diffstat (limited to '')
-rw-r--r--lib/pages/Home.dart12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/pages/Home.dart b/lib/pages/Home.dart
index 2930bf8..3e22f93 100644
--- a/lib/pages/Home.dart
+++ b/lib/pages/Home.dart
@@ -77,10 +77,10 @@ class StatusInfoCard extends StatelessWidget {
class HomeView extends StatelessWidget {
DateTime dateTime;
List<Application> favoriteApps;
+ void Function(Application) openApp;
+ void Function(BuildContext, Application) openOptionsMenu;
- HomeView({ this.dateTime, this.favoriteApps }): super();
-
- void noop(Application app) {}
+ HomeView({ this.dateTime, this.favoriteApps, this.openApp, this.openOptionsMenu }): super();
@override
Widget build(BuildContext ctx) {
@@ -90,7 +90,11 @@ class HomeView extends StatelessWidget {
children: [
StatusInfoCard(dateTime: dateTime),
Expanded(child: Container(
- child: AppList(appList: favoriteApps, openApp: noop, openOptionsMenu: noop),
+ child: AppList(
+ appList: favoriteApps,
+ openApp: openApp,
+ openOptionsMenu: (app) => openOptionsMenu(ctx, app),
+ ),
)),
],
)