반응형
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text('${widget.playlistDetail.name}', style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),),
// Expanded(child: SizedBox.shrink()), // 오른쪽 끝에 넣게 하니까, 플레이리스트 전체를 수정하는 기능이 있어 하는 느낌이야.
SizedBox(width: 10,),
Icon(Icons.edit, color: Colors.grey, size: 22,),
]
)
이런 결과를 볼 수 있다.
여기서 Text를 Flexible로 감싸주면
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Flexible(child: Text('${widget.playlistDetail.name}', style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),)),
// Expanded(child: SizedBox.shrink()), // 오른쪽 끝에 넣게 하니까, 플레이리스트 전체를 수정하는 기능이 있어 하는 느낌이야.
SizedBox(width: 10,),
Icon(Icons.edit, color: Colors.grey, size: 22,),
]
)
이렇게 된다.
반응형
'[클라이언트] > [Flutter]' 카테고리의 다른 글
Flutter Date 다루기 / DateTime (0) | 2022.12.02 |
---|---|
Flutter 코드북 - 예제) 인증 토큰 담아서 전송하기 (api, jwt) (0) | 2022.12.01 |
Flutter 네트워크 이미지 캐싱 (0) | 2022.11.12 |
Flutter base64Encoding (0) | 2022.11.10 |
[Flutter] 객체 디스크에 저장 (Feat. SharedPreferences with json) (0) | 2022.11.06 |