Owner name is correctly displayed

This commit is contained in:
Alzalia 2025-08-05 10:43:30 +02:00
parent 4d9a9ecab1
commit 8af775a1d3

View file

@ -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(