new organisation dialog submitting started

This commit is contained in:
Felix 2019-08-12 10:33:02 +01:00
parent 679fbd2f97
commit 2218422df4
2 changed files with 20 additions and 8 deletions

View file

@ -31,7 +31,7 @@ class Organisations {
itemsList.add(new Organisation( itemsList.add(new Organisation(
i, i,
"Payee " + (i + 1).toString(), "Payee " + (i + 1).toString(),
"eee eee", "tee hee hee",
"yeet street", "yeet street",
"Robloxia" "Robloxia"
)); ));

View file

@ -39,6 +39,10 @@ class FindOrganisations {
// }); // });
} }
_chosenOrg(Organisation chosen) {
debugPrint(chosen.name + " tapped");
}
return showDialog<Organisation>( return showDialog<Organisation>(
context: context, context: context,
barrierDismissible: true, barrierDismissible: true,
@ -114,7 +118,7 @@ class FindOrganisations {
width: MediaQuery width: MediaQuery
.of(context) .of(context)
.size .size
.width * 0.7, .width,
height: MediaQuery height: MediaQuery
.of(context) .of(context)
.size .size
@ -130,9 +134,17 @@ class FindOrganisations {
child: ListTile( child: ListTile(
leading: Icon(Icons.person), leading: Icon(Icons.person),
title: Text(organisationsList[index].name, style: new TextStyle(fontSize: 18)), title: Text(organisationsList[index].name, style: new TextStyle(fontSize: 18)),
trailing: Icon(Icons.arrow_forward_ios), subtitle: Text(organisationsList[index].postcode.toUpperCase()),
onTap: () {}, // 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
},
),
); );
}, },
), ),