Skip to content
pubscout

divkit

0.6.0, released 2 years ago by divkit.tech

Open source Server-Driven UI (SDUI) framework for cross-platform layouts from JSON

$ flutter pub add divkit
Source repository

What it does

DivKit builds native Flutter views from server-sourced JSON data and templates. It enables rapid UI prototyping and lets you ship server-sourced updates to different app versions without releasing new app binaries.

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

Use it when

  • You want to implement server-driven UI (SDUI) updates in your application
  • You need to write cross-platform layouts using a JSON schema definition

Skip it when

  • You need standard purely Dart-defined widget trees without JSON layouts
  • Full web rendering is heavily required, as the Flutter client has limitations on the web

Strengths

  • Allows updating app UIs via server-side JSON changes
  • Provides built-in expression calculation and variable storage runtime
  • Includes support for multiple component types like text, image, container, gallery, and pager

Weaknesses

  • Building DTOs can be expensive and requires careful lifecycle management to avoid frame drops
  • Web platform support is not fully fledged on the Flutter client

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
10

Add dependency to pubspec.yaml and initialize DivKitData from JSON or card/templates.

final data = DefaultDivKitData.fromJson(json);
DivKitView(
  data: data,
)

Alternatives

Packages that do the same job and could replace divkit.

Works with

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