Skip to content
Türkçe
All snippets

WRadio example

A controlled radio button with a selected: state.

  • WDiv
  • WRadio
  • WText
preview
example_w_radio.dart
WDiv(
  className: "w-full flex flex-col gap-3 p-4",
  children: [
    WDiv(
      className: "flex flex-row items-center gap-3 h-12",
      children: [
        WRadio(
          value: "pro",
          groupValue: "pro",
          className: "w-6 h-6 bg-[#22272e] border border-[#539bf5] rounded-full",
          indicatorClassName: "w-3 h-3 bg-[#539bf5] rounded-full",
        ),
        WText("Pro workspace", className: "text-lg text-[#cdd9e5]"),
      ],
    ),
    WDiv(
      className: "flex flex-row items-center gap-3 h-12",
      children: [
        WRadio(
          value: "personal",
          groupValue: "pro",
          className: "w-6 h-6 bg-[#22272e] border border-[#444c56] rounded-full",
          indicatorClassName: "w-3 h-3 bg-[#539bf5] rounded-full",
        ),
        WText("Personal workspace", className: "text-lg text-[#adbac7]"),
      ],
    ),
  ],
)