Single source of truth for styling

You’ll probably find it easier to maintain your views
if you create a single source of truth for styling values
like padding, spacing, corner shape, font sizes, and so on.
This can be done easily with some helper classes:

These constants can then be used in place of hard-coded numeric values:

With all views referencing the same shared-design system rules,
they tend to look better and more consistent.
Making a change or adjusting a value for a specific platform
can be done in a single place, instead of using an error-prone
search and replace. Using shared rules has the added benefit
of helping enforce consistency on the design side.

Some common design system categories that can be represented
this way are:

Animation timings

Sizes and breakpoints

Insets and paddings

Corner radius

Shadows

Strokes

Font families, sizes, and styles