전체 글 310

Flutter] DropDownButton 위젯 properties

items: 항목을 정의할 수 있다. 드롭 메뉴/목록의 아이템을 정의할 수 있으며, 사용자가 선택할 수 있는 목록이다. (리스트) value: 선택된 값에 대한 것을 의미한다. style: 스타일 속성을 사용해서 글꼴 크기, 글꼴 두께 등과 같은 드롭다운 메뉴, 목록의 텍스트 스타일을 지정할 수 있다. alignment: 힌트나 선택한 항목이 버튼 내에서 배치되는 방식을 정의한다. elevation: 드롭다운 메뉴, 목록의 높이를 조정할 수 있다. icon: 버튼 아이콘을 정의한다. iconSize: 버튼 아이콘의 크기를 정의한다. iconDisabledColor: 드롭다운버튼을 비활성화 했을 때 아이콘 색상을 정의할 수 있다. iconEnabledColor: 드롭다운 버튼을 활성화했을 때 아이콘 색상을..

Flutter] Dropbutton의 underline을 없애보자.

...생략 DropdownButton( underline: SizedBox.shrink(), ) ...생략 드롭버튼을 만들면 화면에 기본적으로 언더라인이 붙는다. 이 부분을 삭제하는데 많은 방법이 있는 것 같으나 간단하게 위 방법을 선택했다. 참조 : https://stackoverflow.com/questions/53588785/remove-underline-from-dropdownbuttonformfield Remove underline from DropdownButtonFormField How can I remove the underline from DropdownButtonFormField (check photo below), I have tried various combinations of op..

Flutter] Checkbox를 동그라미로 커스텀해보자.

체크박스를 사용하는 경우가 상당히 많은데, 커스텀해서 사용하는 방법을 알아보자. Checkbox( value: true, onChanged: (bool? value) { print('체크박스'); }, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10)), checkColor: Colors.white, // fillColor: MaterialStateProperty.resolveWith(getColor), activeColor: Color(0xff06bbfb), materialTapTargetSize: MaterialTapTargetSize.padded, ), Checkbox에 shape을 이용하면 사각형 형태가 아래와 같이 구 ..

Flutter] DropdownButton을 눌렀을 때 목록 크기를 맞추는 방법.

DropdownButton으로 드롭박스를 만들었을 때 이런 식으로 width 사이즈가 작게 나와 있다. 근데 비율이라는 드롭박스를 누르면 나오는 목록의 크기가 위의 사이즈와 다르게 나온다. 이 부분을 같도록 만들어보자. 방법은 간단하다. 1. DropdownButton 위젯을 ButtonTheme으로 감싸준다. 2. ButtonTheme 위젯의 옵션 중 alignedDropdown을 true로 주면 된다. 이런식으로 목록의 사이즈가 달라짐을 확인할 수 있다. flutter 개어렵다....

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..

Flutter] ToggleButtons으로 선택 버튼 구현하기

class _MarketOrderBookState extends State { final _isSelected = [true, false, false]; } child: ToggleButtons( constraints: BoxConstraints.expand( width: (constraints.maxWidth - 4) / 3), color: Color(0xff8d8d8d), fillColor: Color(0xff4063ae), selectedColor: Color(0xffffffff), children: [ Wrap( children: [ Padding( padding: const EdgeInsets.only(right: 2.0), child: Icon( Icons.monetization_on, siz..

vscode] 새파일, 새폴더 단축키 설정하는 방법 feat. 윈도우 기준

윈도우 기준으로 작성한다. 1. ctrl + shift + p 2. Open Keyboard Shortcuts(JSON) 선택 후 아래 코드를 붙여넣는다 (배열 안에 오브젝트니깐 잘 보고 하시길) [ { "key": "ctrl+n", "command": "explorer.newFile", "when": "explorerViewletFocus" }, { "key": "ctrl+shift+n", "command": "explorer.newFolder", "when": "explorerViewletFocus" }, ] 3. Keyboard Shortcuts 설정 창에서 기존에 있던 ctrl+n과 ctrl+shift+n을 삭제한다. (기존에는 아무것도 없는 파일 만들기와 vscode 새창을 불러오는 단축키로 지..

brew] gh를 이용해서 git clone 하기

brew 설치하기 맥에서 Homebrew를 설치해줍니다. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" https://brew.sh/index_ko Homebrew The Missing Package Manager for macOS (or Linux). brew.sh 설치가 완료되면 gh를 설치합니다. brew install gh brew 플러그인 목록 확인하기 brew에 어떤 플러그인이 확인해봅니다. 이 중에 gh가 있으면 됩니다. brew에 뭐가 있는지 궁금해서 이 명령어를 사용했습니다만 그냥 gh --version를 써서 확인해도 됩니다. brew list github 로그인..