FittedBox 란, 텍스트의 사이즈를 동적으로 관리하고 싶을 때나, 기타 요소들의 크기를 동적으로 다루고 싶을 때 사용한다. 사용법은 간단하다.
동적으로 크기를 관리하고 싶은 요소를 FittedBox로 감싸면 된다. 여기서 fit 타입을 설정할 수 있다.
(Optional) fit은 BoxFit 열거형을 사용한다. 출처: FittedBox class - widgets library - Dart API description FittedBox class Null safety Scales and positions its child within itself according to fit .
In this example, the image is stretched to fill the entire Container , which would not happen normally without using FittedBox. To create a local project with this code...
#
boxfit
#
fittedbox
#
flutter
원문 링크 : [Flutter] FittedBox에 대해서