diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-06-05 21:33:12 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-06-05 21:33:12 +0530 |
| commit | 83be047e15efd91a26ac27da1710b0e273706b19 (patch) | |
| tree | cfa6e1b5ad78261a4bdf6e579447c242e55873e4 /lib/components | |
| parent | b66b37d3f6ccd1438077ecb67439365d080066ba (diff) | |
| download | daft-launcher-83be047e15efd91a26ac27da1710b0e273706b19.tar.gz daft-launcher-83be047e15efd91a26ac27da1710b0e273706b19.zip | |
Adds options menu with dummy refresh buttton
Diffstat (limited to 'lib/components')
| -rw-r--r-- | lib/components/AppContextMenu.dart | 29 | ||||
| -rw-r--r-- | lib/components/Option.dart | 30 |
2 files changed, 31 insertions, 28 deletions
diff --git a/lib/components/AppContextMenu.dart b/lib/components/AppContextMenu.dart index 72d67aa..d648d0c 100644 --- a/lib/components/AppContextMenu.dart +++ b/lib/components/AppContextMenu.dart @@ -5,34 +5,7 @@ import 'package:android_intent/flag.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../data/favorites.dart'; - -class Option extends StatelessWidget { - void Function() onTap; - Widget icon; - Widget child; - - Option({ this.child, this.icon, this.onTap }): super(); - - @override - build(BuildContext ctx) { - return Column( - children: [ - ListTile( - contentPadding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 16.0), - title: Row(children: [ - Container(width: 36.0, padding: EdgeInsets.only(right: 16.0), child: icon), - child, - ]), - onTap: () { - onTap(); - Navigator.pop(ctx); - }, - ), - Divider(height: 1.0), - ], - ); - } -} +import 'Option.dart'; class AppContextMenu extends StatelessWidget { final Application app; diff --git a/lib/components/Option.dart b/lib/components/Option.dart new file mode 100644 index 0000000..3460c8a --- /dev/null +++ b/lib/components/Option.dart @@ -0,0 +1,30 @@ +import 'package:flutter/material.dart'; + +class Option extends StatelessWidget { + void Function() onTap; + Widget icon; + Widget child; + + Option({ this.child, this.icon, this.onTap }): super(); + + @override + build(BuildContext ctx) { + return Column( + children: [ + ListTile( + contentPadding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 16.0), + title: Row(children: [ + Container(width: 36.0, padding: EdgeInsets.only(right: 16.0), child: icon), + child, + ]), + onTap: () { + onTap(); + Navigator.pop(ctx); + }, + ), + Divider(height: 1.0), + ], + ); + } +} + |
