I am making an android TV app using Flutter. How to show the boundary on a dropdown widget if the dropdown is focused?
I tried wrapping the dropdown with focus but then I could not access dropdown items.
Focus(
focusNode: _focusNode,
child: Container(
decoration: _focusNode.hasFocus
? BoxDecoration(border: Border.all(color: Colors.grey))
: BoxDecoration(),
child: DropdownButtonHideUnderline(
child: DropdownButton<Country>(
icon: const Icon(
Icons.keyboard_arrow_down,
color: Color(0xFF707B89),
size: 18.0,
),
isDense: true,
onChanged: (Country value) {
setState(() {
_selectedCountry = value;
widget.onValuePicked(value);
});
},
items: items,
value: _selectedCountry,
),
),
),
),