Open zhangyyysss opened 1 year ago
书中计算转换坐标: 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
书中计算转换坐标: 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