From aa6de5559a80b54b3936b2a4260fcda681a5d40a Mon Sep 17 00:00:00 2001 From: Felix Date: Wed, 7 Aug 2019 14:02:36 +0100 Subject: [PATCH] more --- lib/common/widgets/organisations_dialog.dart | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/common/widgets/organisations_dialog.dart b/lib/common/widgets/organisations_dialog.dart index f175ae4..db1a3c9 100644 --- a/lib/common/widgets/organisations_dialog.dart +++ b/lib/common/widgets/organisations_dialog.dart @@ -15,7 +15,7 @@ class FindOrganisations { ); } - List getStuff() { + List getFavourites() { var numItems = 200; var itemsList = new List(); @@ -29,9 +29,12 @@ class FindOrganisations { return itemsList; } + // todo: get all organisations, favourites and all data from one 'organisations' class or similar + // eg items: organisations.getFavourites().orderBy(name), + Future dialog(context) { var searchBar = getSearchBar(null, "Payee Name"); - var stuff = getStuff(); + var favourites = getFavourites(); return showDialog( context: context, barrierDismissible: true, @@ -53,21 +56,22 @@ class FindOrganisations { ), Container( - padding: EdgeInsets.all(10), + padding: EdgeInsets.fromLTRB(10, 10, 10, 0), width: MediaQuery.of(context).size.width * 0.7, - height: MediaQuery.of(context).size.height * 0.7, + height: MediaQuery.of(context).size.height * 0.67, child: Material( shadowColor: Colors.transparent, color: Colors.transparent, child: ListView.builder( - itemCount: stuff.length, + itemCount: favourites.length, itemBuilder: (context, index) { return Card( child: ListTile( leading: Icon(Icons.person), - title: stuff[index], + title: favourites[index], trailing: Icon(Icons.arrow_forward_ios), + onTap: () {}, ) ); },