Are there any performance difference between modifiers? #473
Answered
by
leoafarias
Maksimka101
asked this question in
Q&A
-
Should I use the |
Beta Was this translation helpful? Give feedback.
Answered by
leoafarias
Sep 4, 2024
Replies: 1 comment 2 replies
-
@Maksimka101 it is the same difference as adding.
The Let me know if that makes sense. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
tilucasoli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Maksimka101 it is the same difference as adding.
Padding(padding...)
vsContainer(padding: ...)
or
SizedBox
vsContainer(height:...)
The
Container
widget adds the Padding widget internally, so it just changes the order of the widgets in the tree. So in the case of $with.padding, or $box.mod.padding, they will behave more like amargin
than a Container with padding.Let me know if that makes sense.