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),
|
SizedBox(height: 5),
|
||||||
(showNewOwner || widget.viewModel.owners!.isEmpty)
|
(showNewOwner || widget.viewModel.owners!.isEmpty)
|
||||||
? SizedBox()
|
? SizedBox()
|
||||||
: DropdownMenu<Owner>(
|
: SingleChildScrollView(
|
||||||
enableFilter: true,
|
padding: EdgeInsets.only(
|
||||||
controller: searchController,
|
bottom: MediaQuery.of(context).viewInsets.bottom,
|
||||||
label: Text("Rechercher un·e propriétaire"),
|
),
|
||||||
requestFocusOnTap: true,
|
child: DropdownMenu<Owner>(
|
||||||
dropdownMenuEntries: [
|
enableFilter: true,
|
||||||
for (var owner in widget.viewModel.owners!)
|
controller: searchController,
|
||||||
DropdownMenuEntry(
|
label: Text("Rechercher un·e propriétaire"),
|
||||||
value: owner,
|
requestFocusOnTap: true,
|
||||||
label: "${owner.firstName} ${owner.lastName}",
|
dropdownMenuEntries: [
|
||||||
style: ButtonStyle(
|
for (var owner in widget.viewModel.owners!)
|
||||||
backgroundColor:
|
DropdownMenuEntry(
|
||||||
(widget.viewModel.currentOwner == owner)
|
value: owner,
|
||||||
? WidgetStatePropertyAll<Color>(
|
label: "${owner.firstName} ${owner.lastName}",
|
||||||
theme.highlightColor,
|
style: ButtonStyle(
|
||||||
)
|
backgroundColor:
|
||||||
: WidgetStatePropertyAll<Color>(
|
(widget.viewModel.currentOwner == owner)
|
||||||
theme.canvasColor,
|
? WidgetStatePropertyAll<Color>(
|
||||||
),
|
theme.highlightColor,
|
||||||
|
)
|
||||||
|
: WidgetStatePropertyAll<Color>(
|
||||||
|
theme.canvasColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
onSelected: (Owner? owner) {
|
||||||
onSelected: (Owner? owner) {
|
widget.viewModel.currentOwner = owner;
|
||||||
widget.viewModel.currentOwner = owner;
|
},
|
||||||
},
|
enableSearch: true,
|
||||||
enableSearch: true,
|
),
|
||||||
),
|
),
|
||||||
(!showNewOwner)
|
(!showNewOwner)
|
||||||
? SizedBox()
|
? SizedBox()
|
||||||
|
|
|
||||||
Reference in a new issue