v1.0.0
widget_size
빌드되고 위젯 트리에 연결된 후 크기를 계산하는 위젯
38좋아요 89230일 다운로드150Pub 점수
AndroidiOSWebmacOSWindowsLinux
빌드되고 위젯 트리에 연결된 후 크기를 계산하는 위젯
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A widget to calculate it's size after being built and attached to a widget tree
https://raw.githubusercontent.com/javaherisaber/widget_size/HEAD/demo.gif
To use this plugin, add widget_size as a dependency in your pubspec.yaml file.
dependencies:
widget_size: ^lastVersion
double _yourHeight = 50;
double _yourWidth = 50;
WidgetSize(
onChange: (Size size) {
// your Widget size available here
_yourHeight = size.height;
_yourWidth = size.width;
},
child: Container(
height: _yourHeight,
width: _yourWidth,
color: Theme.of(context).primaryColor,
),
)