본문 바로가기

alignment4

Flutter 플러터: 거울 효과를 얻기 위해 아이콘을 뒤집는 방법은 무엇인가요?, Flutter: How to flip an icon to get mirror effect? 질문 I want to flip this replay material icon so that it can be used as forward. Present Icon: Required Result: 답변 이전: 이후: import 'dart:math' as math; // import this Transform( alignment: Alignment.center, transform: Matrix4.rotationY(math.pi), child: Icon(Icons.rotate_left, size: 100,), ) 2023. 8. 28.
Flutter 플러터에서 이미지를 전체 배경에 맞게 (100% 높이 x 100% 너비) 늘리는 방법은 무엇인가요?, How do I stretch an image to fit the whole background (100% height x 100% width) in Flutter? 질문 내 기기의 화면 비율과 일치하지 않는 이미지가 있습니다. 이미지를 화면에 완전히 채우도록 늘이고 이미지의 어떤 부분도 잘라내지 않도록 하려고 합니다. CSS에는 백분율 개념이 있으므로 높이와 너비를 100%로 설정할 수 있습니다. 하지만 Flutter에는 그 개념이 없는 것 같고, 높이와 너비를 하드코딩하는 것은 좋지 않으므로 막혀 있습니다. 다음은 내가 가진 것입니다 (앞쪽에 무언가가 있으므로 Stack을 사용합니다): Widget background = new Container( height: // 여기에 무엇을 넣어야 할지 모릅니다! width: // 여기에 무엇을 넣어야 할지 모릅니다! child: new Image.asset( asset.background, fit: BoxFit.fill,.. 2023. 6. 1.
Flutter 플러터에서 행의 요소 간 간격 설정하기, Set the space between Elements in Row Flutter 질문 코드: new Container( alignment: FractionalOffset.center, child: new Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ new FlatButton( child: new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))), ), new FlatButton( child: new Text('Register.', style: new TextStyle(color: Color(0xFF84A2AF), fontWeight: FontWeight.bold),), onPressed: moveToRegister, .. 2023. 5. 15.
Flutter 플러터에서 두 항목을 극단에 맞추어 정렬 - 하나는 왼쪽에, 다른 하나는 오른쪽에, Flutter align two items on extremes - one on the left and one on the right 질문 저는 두 항목을 왼쪽과 오른쪽 끝에 맞추려고 노력하고 있습니다. 왼쪽에 맞춰진 하나의 행과 그 하위에 오른쪽에 맞춰진 하위 행이 있습니다. 그러나 하위 행이 부모에서 정렬 속성을 가져오는 것 같습니다. 이것은 내 코드입니다. var SettingsRow = new Row( mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.max, children: [ Text("Right",softWrap: true,), ], ); var nameRow = new Row( mainAxisAlignment: MainAxisAlignment.start, cross.. 2023. 5. 13.