Skip to content
Türkçe
All snippets

WDynamic example

Renders a widget tree from JSON at runtime.

  • WDiv
  • WDynamic
preview
example_w_dynamic.dart
WDiv(
  className: "w-full p-4",
  child: WDynamic(
    json: {
      "type": "WDiv",
      "props": {
        "className": "w-full p-4 bg-[#22272e] border border-[#444c56] rounded-xl",
      },
      "children": [
        {
          "type": "WText",
          "props": {
            "text": "From data to beautiful UI",
            "className": "text-lg text-[#cdd9e5] font-semibold",
          },
        },
      ],
    },
  ),
)