简体   繁体   中英

Difference between EdgeInsetsGeometry Class EdgeInsets Class in Flutter Dart?

I'm trying to understand some basic elements of Flutter. When I try to use the property of a container, like padding, I believe that it expects an "EdgeInsetGeometry" class. When I read the document about this class, I see that there is "EdgeInset" class as an implementer. 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. 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?

EdgeInsetsGeometry class is a class for EdgeInsets that allows for text-direction aware resolution.

EdgeInsets class is an immutable set of offsets in each of the four cardinal directions.

Check the article below for more explanation It really helps:

EdgeInsets and EdgeInsets Geometry

I hope this answers your question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM