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