I am using the searching mode in DropDowmMenu.
So we can filter the itens by writing some value.
I need to auto clean what we wrote when we click in the arrow to open the list itens.
Is it possible? I tried inkweel but nop, always only the event in the dropdown is fired. Ontap from inkwell never is fired.
But its not a good way even if was worked, because the idea is fire only when we open the item list. And it happens when we click in the arrow in the right side.
Thank you!
Container(
//padding: const EdgeInsets.symmetric(horizontal: 8),
height: 40,
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
color: Theme.of(context).colorScheme.secondary,
),
width: double.infinity,
child:
DropdownMenu<Models>(
label: Text(translation(context)!.dropModel),
dropdownMenuEntries: dropdownModelsItems,
requestFocusOnTap: true,
onSelected: dropDownModelsCallBack,
enableSearch: true,
controller: modelController,
enableFilter: true,
menuStyle: const MenuStyle(
alignment: Alignment.bottomLeft,
maximumSize:
MaterialStatePropertyAll(Size.fromHeight(400)),
),
expandedInsets: const EdgeInsets.symmetric(horizontal: 0),
inputDecorationTheme: InputDecorationTheme(
isDense: true,
contentPadding: const EdgeInsets.symmetric(horizontal: 10),
constraints: const BoxConstraints(minWidth: 300, maxWidth: 700, maxHeight: 40),
fillColor: Colors.red,
//filled: true,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
),
),
),
),
Alexandre Bisewski is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.