From 83be047e15efd91a26ac27da1710b0e273706b19 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 5 Jun 2020 21:33:12 +0530 Subject: Adds options menu with dummy refresh buttton --- lib/components/Option.dart | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/components/Option.dart (limited to 'lib/components/Option.dart') 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), + ], + ); + } +} + -- cgit v1.3.1