fix: kinda fixed a visual bug
This commit is contained in:
parent
3fc0f8df16
commit
72fd0b66a9
1 changed files with 30 additions and 25 deletions
|
|
@ -42,32 +42,37 @@ class _OwnerPopupState extends State<OwnerPopup> {
|
|||
SizedBox(height: 5),
|
||||
(showNewOwner || widget.viewModel.owners!.isEmpty)
|
||||
? SizedBox()
|
||||
: DropdownMenu<Owner>(
|
||||
enableFilter: true,
|
||||
controller: searchController,
|
||||
label: Text("Rechercher un·e propriétaire"),
|
||||
requestFocusOnTap: true,
|
||||
dropdownMenuEntries: [
|
||||
for (var owner in widget.viewModel.owners!)
|
||||
DropdownMenuEntry(
|
||||
value: owner,
|
||||
label: "${owner.firstName} ${owner.lastName}",
|
||||
style: ButtonStyle(
|
||||
backgroundColor:
|
||||
(widget.viewModel.currentOwner == owner)
|
||||
? WidgetStatePropertyAll<Color>(
|
||||
theme.highlightColor,
|
||||
)
|
||||
: WidgetStatePropertyAll<Color>(
|
||||
theme.canvasColor,
|
||||
),
|
||||
: SingleChildScrollView(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: MediaQuery.of(context).viewInsets.bottom,
|
||||
),
|
||||
child: DropdownMenu<Owner>(
|
||||
enableFilter: true,
|
||||
controller: searchController,
|
||||
label: Text("Rechercher un·e propriétaire"),
|
||||
requestFocusOnTap: true,
|
||||
dropdownMenuEntries: [
|
||||
for (var owner in widget.viewModel.owners!)
|
||||
DropdownMenuEntry(
|
||||
value: owner,
|
||||
label: "${owner.firstName} ${owner.lastName}",
|
||||
style: ButtonStyle(
|
||||
backgroundColor:
|
||||
(widget.viewModel.currentOwner == owner)
|
||||
? WidgetStatePropertyAll<Color>(
|
||||
theme.highlightColor,
|
||||
)
|
||||
: WidgetStatePropertyAll<Color>(
|
||||
theme.canvasColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
onSelected: (Owner? owner) {
|
||||
widget.viewModel.currentOwner = owner;
|
||||
},
|
||||
enableSearch: true,
|
||||
],
|
||||
onSelected: (Owner? owner) {
|
||||
widget.viewModel.currentOwner = owner;
|
||||
},
|
||||
enableSearch: true,
|
||||
),
|
||||
),
|
||||
(!showNewOwner)
|
||||
? SizedBox()
|
||||
|
|
|
|||
Reference in a new issue