xsdui 0.0.1 copy "xsdui: ^0.0.1" to clipboard
xsdui: ^0.0.1 copied to clipboard

For Server Driven UI

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:xsdui/xsdui/xsdui_main.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: XSdui.fromJson(
        context,
        json: {
          "type": "container",
          "attr": {
            "width": 300.0,
            "height": 300.0,
            "color": "#AA4A44",
            "borderRadius": {
              "borderRadiusType": "circular",
              "radius": 10.0,
            }
          },
          "child": {
            "type": "column",
            "attr": {
              "mainAxisAlignment": "center",
              "crossAxisAlignment": "start",
              "mainAxisSize": "min"
            },
            "children": [
              {
                "type": "container",
                "attr": {
                  "width": 50.0,
                  "height": 50.0,
                  "color": "#EE4B2B",
                }
              },
              {
                "type": "text",
                "text": "Thanks for using this package",
                "attr": {
                  "height": 1.4,
                  "fontSize": 12.5,
                  "fontFamily": "SourceSansPro",
                  "fontWeight": "w600"
                }
              }
            ]
          }
        },
      ),
    );
  }
}
1
likes
120
points
4
downloads

Publisher

unverified uploader

Weekly Downloads

For Server Driven UI

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter, freezed_annotation, json_annotation, logger

More

Packages that depend on xsdui