79781191

Date: 2025-10-02 18:20:51
Score: 1.5
Natty:
Report link

Compose is not an imperative system like the old view system, it's declarative and as a rule you would not need to ever get the padding, if it was some how mutable, you would calculate it in the ui state, then pass it to the composition.

There is one caveat, in that you might need to do that during layout of a component.
In that case you want intrinsic measurements. Look up intrinsic measurements and layout in the compose documentation. The need to do this should be fairly rare though.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Brill Pappin