lib/live_view_native_swift_ui/types/edge_insets.ex
defmodule LiveViewNativeSwiftUi.Types.EdgeInsets do
@derive Jason.Encoder
defstruct [:top, :leading, :bottom, :trailing]
use LiveViewNativePlatform.Modifier.Type
def type, do: :map
def cast(value) when is_map(value) or is_list(value), do: {:ok, struct(__MODULE__, value)}
def cast(_), do: :error
end