FLUTTER ECOSYSTEM

javaherisaber/widget_size

빌드되고 위젯 트리에 연결된 후 크기를 계산하는 위젯

widget_size 프로젝트 이미지
Stars
6
Forks
0
최근 푸시(UTC)
2022. 10. 9.
프로젝트 상태
활성
Mahdi Javaheri GitHub avatar
GITHUB User

Mahdi Javaheri ↗

Software Engineer

Yerevan, Armenia
언어DartHTMLSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^1.0.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

widget_size

pub package

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

Usage

To use this plugin, add widget_size as a dependency in your pubspec.yaml file.

dependencies:
  widget_size: ^lastVersion

Example

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,
  ),
)