flutter_in_action_2nd icon indicating copy to clipboard operation
flutter_in_action_2nd copied to clipboard

纠错: 第四章 4.7 对齐与相对定位(alignment)

Open zhangyyysss opened this issue 1 year ago • 0 comments

书中计算转换坐标: Alignment可以通过其坐标转换公式将其坐标转为子元素的具体偏移坐标: (Alignment.xchildWidth/2+childWidth/2, Alignment.ychildHeight/2+childHeight/2)

实际上坐标转换应该与原容器大小有关: https://api.flutter-io.cn/flutter/widgets/Align-class.html https://segmentfault.com/a/1190000041631644

zhangyyysss avatar Jun 12 '23 03:06 zhangyyysss