Untitled

 avatar
unknown
plain_text
a year ago
812 B
2
Indexable
TextField(
      decoration: InputDecoration(
        prefixIcon: Icon(Icons.school),
        hintText: dropdownValue,
        contentPadding: EdgeInsets.all(10),
        border: OutlineInputBorder(
          borderRadius: BorderRadius.circular(20)
        ),
        suffixIcon: DropdownButton<String>(
          icon: const Icon(Icons.arrow_downward),
          elevation: 16,
          onChanged: (String? value) {
            // This is called when the user selects an item.
            setState(() {
              dropdownValue = value!;
            });
          },
          items: list.map<DropdownMenuItem<String>>((String value) {
            return DropdownMenuItem<String>(
              value: value,
              child: Text(value),
            );
          }).toList(),
        ),
      ),
    );