Owner name is correctly displayed
This commit is contained in:
parent
4d9a9ecab1
commit
8af775a1d3
1 changed files with 15 additions and 8 deletions
|
|
@ -44,10 +44,16 @@ class _AddPageState extends State<AddPage> {
|
||||||
margin: EdgeInsets.symmetric(horizontal: 50),
|
margin: EdgeInsets.symmetric(horizontal: 50),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListenableBuilder(
|
||||||
|
listenable: widget.viewModel,
|
||||||
|
builder: (context, child) => ListTile(
|
||||||
leading: Icon(Icons.person),
|
leading: Icon(Icons.person),
|
||||||
title: TextButton(
|
title: TextButton(
|
||||||
child: Text("No"),
|
child: Text(
|
||||||
|
(widget.viewModel.currentOwner == null)
|
||||||
|
? "Aucun"
|
||||||
|
: "${widget.viewModel.currentOwner!.firstName} ${widget.viewModel.currentOwner!.lastName}",
|
||||||
|
),
|
||||||
onPressed: () => _ownerDialogBuilder(
|
onPressed: () => _ownerDialogBuilder(
|
||||||
context,
|
context,
|
||||||
controller,
|
controller,
|
||||||
|
|
@ -55,6 +61,7 @@ class _AddPageState extends State<AddPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.attach_money),
|
leading: Icon(Icons.attach_money),
|
||||||
title: TextButton(
|
title: TextButton(
|
||||||
|
|
|
||||||
Reference in a new issue