v1.0.0
widget_size
一个在构建并附加到组件树后计算其大小的组件
38喜欢 2300近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个在构建并附加到组件树后计算其大小的组件
以下为英文项目原文快照,最新内容请访问 GitHub。
A widget to calculate it's size after being built and attached to a widget tree

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,
),
)
依赖清单 3 项
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗