Skip to content
pubscout

xwidget

0.7.2, released 2 months ago by appfluent.us

Build dynamic UIs in Flutter using an expressive, XML based markup language.

WASM-ready
$ flutter pub add xwidget
Source repository

What it does

XWidget enables server-driven UI in Flutter by moving presentation resources into versioned XML bundles. It provides an expression language, controllers in Dart, and cloud bundle delivery while keeping native integrations in compiled code.

AI-written summary of version 0.7.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to update screens and layout dynamically without shipping a new app build
  • You want to run A/B tests, staged rollouts, and channel-based UI releases
  • You prefer an XML markup language mapped to Flutter widgets

Skip it when

  • You require heavy business logic to reside entirely within markup
  • You do not want to use code generation for your widget components

Strengths

  • Update UI and copy remotely via XWidget Cloud
  • Leverage existing Flutter SDK, package, and custom widgets through generated inflaters
  • Keep behavior in Dart controllers while markup handles presentation

Weaknesses

  • Requires build-time code generation for component registration
  • Depends on an external cloud platform or custom infrastructure for dynamic bundle hosting

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
8

Add the xwidget_builder dev dependency, run initialization and generation commands, and register components before calling runApp().

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await XWidget.initialize(register: registerXWidgetComponents);

  runApp(const MyApp());
}

Alternatives

Packages that do the same job and could replace xwidget.

  • stac

    A Server-Driven UI framework for Flutter that renders JSON payloads into native widgets.

  • yaru

    Flutter widgets and theme following the Yaru design language for desktop and web.

  • stac_core

    Core library for the Stac server‑driven UI framework, providing models, interfaces, and utilities.

Works with

Packages commonly used together with xwidget: ones it builds on, ones built on it, and its own family.