setState(() {
selectedEndNumber = newValue ?? 0;
if (selectedEndNumber < selectedStartNumber) {
selectedEndNumber = selectedStartNumber;
}
});
},
underline: Container(),
alignment: Alignment.centerLeft,
dropdownColor: const Color(0xff0D0D16),
icon: const Padding(
padding: EdgeInsets.only(left: 80.0),
child: Icon(Icons.arrow_drop_down,
color: Colors.white),
),
items: List.generate(
numberOfAyahs + 1 - selectedStartNumber,
(index) =>
DropdownMenuItem<int>(
value: selectedStartNumber + index,
child: Padding(
padding: const EdgeInsets.only(left: 10.0),
child: Text('${selectedStartNumber + (index + 1)}',
style: const TextStyle(
color: Colors
.white, fontSize: 14)),
),
),
),
borderRadius: BorderRadius.circular(
8),
),
Hello guys, i have this dropdown and when i select any value then slected value doesn’t show inside dropdown selected index, how can fix that, i have already add setState bu still this error
try to wrap dropdown in StatefulBuilder
Обсуждают сегодня