728x90 반응형 container2 [flutter] "Cannot provide both a color and a decoration" 에러 Flutter에서 "Cannot provide both a color and a decoration" 오류가 발생하는 이유는 위젯에 대해 동시에 색상과 장식을 제공했기 때문입니다. 예를 들어 Container 위젯에서 color 속성과 decoration 속성을 모두 설정하는 경우에 오류가 발생할 수 있습니다. 이 오류를 해결하려면 Container 위젯의 color 속성 또는 decoration 속성 중 하나만 사용해야 합니다. 예를 들어 Container 위젯의 배경색을 설정하려면 color 속성을 사용하고, 이미지 또는 그림자와 같은 장식을 추가하려면 decoration 속성을 사용하면 됩니다. 만약 두 가지 속성을 모두 사용하고 싶다면, decoration 속성을 사용하고 BoxDecoration.. 2023. 4. 25. flutter에서 OutlinedButton width 변경 방법 SizeBox 사용 SizedBox( width: 200, // set the width to 200 child: OutlinedButton( onPressed: () { // add your onPressed logic here }, child: Text('My Button'), ), ); Container 사용 Container( width: 200, // set the width to 200 child: OutlinedButton( onPressed: () { // add your onPressed logic here }, child: Text('My Button'), ), ); container 미국∙영국 [kənˈteɪnə(r)] 1. 그릇, 용기 2. (화물 수송용) 컨테이너 2023. 3. 23. 이전 1 다음 728x90 반응형