【Flutter】LayoutBuilder作为child获取父
2021-07-20 本文已影响0人
DerekTime
LayoutBuilder(
builder: (context, constraints){
/// constraints
/// The maximum width that satisfies the constraints.
///
/// Might be [double.infinity].
final double maxWidth;
/// The maximum height that satisfies the constraints.
///
/// Might be [double.infinity].
final double maxHeight;
}
)