[英]Difference between EdgeInsetsGeometry Class EdgeInsets Class in Flutter Dart?
I'm trying to understand some basic elements of Flutter.我试图了解 Flutter 的一些基本元素。 When I try to use the property of a container, like padding, I believe that it expects an "EdgeInsetGeometry" class.
当我尝试使用容器的属性(如填充)时,我相信它需要一个“EdgeInsetGeometry”class。 When I read the document about this class, I see that there is "EdgeInset" class as an implementer.
当我阅读有关此 class 的文档时,我看到有“EdgeInset”class 作为实现者。 I'm confused about this point since I don't know which one I should use.
我对这一点感到困惑,因为我不知道应该使用哪一个。
The document for Flutter is kind of confusing for me at the moment. Flutter 的文档目前对我来说有点混乱。 Could you please help to explain the difference between these two, and how I can figure out what the type of the output is for a class using flutter document?
您能否帮助解释这两者之间的区别,以及如何使用 flutter 文档确定 output 的类型对于 class 是什么?
EdgeInsetsGeometry class is a class for EdgeInsets that allows for text-direction aware resolution. EdgeInsetsGeometry class是用于 EdgeInsets 的 class,它允许文本方向感知分辨率。
EdgeInsets class is an immutable set of offsets in each of the four cardinal directions. EdgeInsets class是四个基本方向中每个方向上的一组不可变偏移量。
Check the article below for more explanation It really helps:查看下面的文章以获得更多解释它确实有帮助:
EdgeInsets and EdgeInsets Geometry EdgeInsets 和 EdgeInsets 几何
I hope this answers your question.我希望这回答了你的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.