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/Option.dart | |
| parent | b66b37d3f6ccd1438077ecb67439365d080066ba (diff) | |
| download | daft-launcher-83be047e15efd91a26ac27da1710b0e273706b19.tar.gz daft-launcher-83be047e15efd91a26ac27da1710b0e273706b19.zip | |
Adds options menu with dummy refresh buttton
Diffstat (limited to '')
| -rw-r--r-- | lib/components/Option.dart | 30 |
1 files changed, 30 insertions, 0 deletions
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), + ], + ); + } +} + |
