final _valueList = ['최대', '50%', '25%', '15%', '10%']; String? _selectedValue; ... 생략 Container( child: DropdownButton( hint: Text('비율'), items: _valueList .map( (String item) => DropdownMenuItem( child: Text(item), value: item, ), ) .toList(), onChanged: (String? value) => setState(() { print('==> ${this._selectedValue}'); print('==> selected $value'); this._selectedValue = value; }), value: _s..
Flutter] DropdownButton으로 DropBox 구현하기
final _valueList = ['최대', '50%', '25%', '15%', '10%']; String? _selectedValue; ... 생략 Container( child: DropdownButton( hint: Text('비율'), items: _valueList .map( (String item) => DropdownMenuItem( child: Text(item), value: item, ), ) .toList(), onChanged: (String? value) => setState(() { print('==> ${this._selectedValue}'); print('==> selected $value'); this._selectedValue = value; }), value: _s..
2022.03.15