diff --git a/lib/common/apifunctions/find_organisations.dart b/lib/common/apifunctions/find_organisations.dart index 4d441a3..772f37a 100644 --- a/lib/common/apifunctions/find_organisations.dart +++ b/lib/common/apifunctions/find_organisations.dart @@ -31,7 +31,7 @@ class Organisations { itemsList.add(new Organisation( i, "Payee " + (i + 1).toString(), - "eee eee", + "tee hee hee", "yeet street", "Robloxia" )); diff --git a/lib/common/widgets/organisations_dialog.dart b/lib/common/widgets/organisations_dialog.dart index ab8f374..2134fb7 100644 --- a/lib/common/widgets/organisations_dialog.dart +++ b/lib/common/widgets/organisations_dialog.dart @@ -39,6 +39,10 @@ class FindOrganisations { // }); } + _chosenOrg(Organisation chosen) { + debugPrint(chosen.name + " tapped"); + } + return showDialog( context: context, barrierDismissible: true, @@ -114,7 +118,7 @@ class FindOrganisations { width: MediaQuery .of(context) .size - .width * 0.7, + .width, height: MediaQuery .of(context) .size @@ -127,12 +131,20 @@ class FindOrganisations { itemCount: organisationsList.length, itemBuilder: (context, index) { return Card( - child: ListTile( - leading: Icon(Icons.person), - title: Text(organisationsList[index].name, style: new TextStyle(fontSize: 18)), - trailing: Icon(Icons.arrow_forward_ios), - onTap: () {}, - ) + child: ListTile( + leading: Icon(Icons.person), + title: Text(organisationsList[index].name, style: new TextStyle(fontSize: 18)), + subtitle: Text(organisationsList[index].postcode.toUpperCase()), +// trailing: Icon(Icons.arrow_forward_ios), +// onTap: _chosenOrg(organisationsList[index]), + onTap: (){ + _chosenOrg(organisationsList[index]); + }, + onLongPress: (){ + // show more details about the organisation in a new dialog + + }, + ), ); }, ),