Skip to content
pubscout

dynamic_widget

6.0.0, released 2 years ago by an unverified publisher

A backend-driven UI toolkit to build dynamic Flutter user interfaces using JSON.

WASM-readyQuiet but busy
$ flutter pub add dynamic_widget
Source repository

What it does

Allows you to convert JSON strings into Flutter widgets dynamically at runtime. It mirrors standard Flutter widget structures and properties, enabling you to update app UIs remotely without republishing to app stores.

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

Use it when

  • You need to update app UIs dynamically by pushing JSON files from a backend.
  • You want to perform UI A/B testing without publishing new app versions to app stores.

Skip it when

  • Your application requires complex custom widget logic that cannot be easily serialized to JSON or parsed via custom widget parsers.
  • You want a fully native compiled UI experience without the overhead of interpretation.

Strengths

  • Supports a wide array of built-in Flutter widgets.
  • Provides a DynamicWidgetJsonExportor to easily export your Flutter code into JSON strings.
  • Extensible through custom WidgetParsers.

Weaknesses

  • Building widgets from JSON strings can be time-consuming and requires careful handling (such as FutureBuilder).
  • Does not support every single Flutter widget and property out of the box.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

not documented

Future<Widget> _buildWidget(BuildContext context) async {
  return DynamicWidgetBuilder.build(jsonString, context, new DefaultClickListener());
}

Alternatives

Packages that do the same job and could replace dynamic_widget.

  • stac

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

Works with

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