问题描述
我正在使用 google_maps_flutter: ^1.1.1
我需要找到 Widget 的 height
并根据此 height
设置填充。
解决方法
看到这个:How to get height of a Widget?
你也可以使用这个包, https://pub.dev/packages/render_metrics 结合: https://pub.dev/packages/after_layout。
第二个包用于第一次布局构建后的回调。
我正在使用 google_maps_flutter: ^1.1.1
我需要找到 Widget 的 height
并根据此 height
设置填充。
看到这个:How to get height of a Widget?
你也可以使用这个包, https://pub.dev/packages/render_metrics 结合: https://pub.dev/packages/after_layout。
第二个包用于第一次布局构建后的回调。