This commit is contained in:
Felix 2019-08-07 14:02:36 +01:00
parent 60b1c5b10c
commit aa6de5559a

View file

@ -15,7 +15,7 @@ class FindOrganisations {
); );
} }
List<Text> getStuff() { List<Text> getFavourites() {
var numItems = 200; var numItems = 200;
var itemsList = new List<Text>(); var itemsList = new List<Text>();
@ -29,9 +29,12 @@ class FindOrganisations {
return itemsList; return itemsList;
} }
// todo: get all organisations, favourites and all data from one 'organisations' class or similar
// eg items: organisations.getFavourites().orderBy(name),
Future<Organisation> dialog(context) { Future<Organisation> dialog(context) {
var searchBar = getSearchBar(null, "Payee Name"); var searchBar = getSearchBar(null, "Payee Name");
var stuff = getStuff(); var favourites = getFavourites();
return showDialog<Organisation>( return showDialog<Organisation>(
context: context, context: context,
barrierDismissible: true, barrierDismissible: true,
@ -53,21 +56,22 @@ class FindOrganisations {
), ),
Container( Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
width: MediaQuery.of(context).size.width * 0.7, 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( child: Material(
shadowColor: Colors.transparent, shadowColor: Colors.transparent,
color: Colors.transparent, color: Colors.transparent,
child: ListView.builder( child: ListView.builder(
itemCount: stuff.length, itemCount: favourites.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Card( return Card(
child: ListTile( child: ListTile(
leading: Icon(Icons.person), leading: Icon(Icons.person),
title: stuff[index], title: favourites[index],
trailing: Icon(Icons.arrow_forward_ios), trailing: Icon(Icons.arrow_forward_ios),
onTap: () {},
) )
); );
}, },