divkit
0.6.0, released 2 years ago by divkit.tech
Open source Server-Driven UI (SDUI) framework for cross-platform layouts from JSON
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.
- stac_framework
Enables easy creation of custom parsers for widgets and actions in server-driven UI implementations.
72Compare - simple_circular_progress_bar
A simple customizable circular progress indicator widget for Flutter.
50Compare - webviewx_plus
Cross‑platform webview widget using webview_flutter for mobile and iframe for web with JS interop
53Compare
Works with
Packages commonly used together with divkit: ones it builds on, ones built on it, and its own family.
- petitparserdivkit depends on itBuild fast, composable, and type-safe grammars and parsers in plain Dart code.
- clockdivkit depends on itA fakeable wrapper for dart:core clock APIs.
- loggingdivkit depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- equatabledivkit depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- flutter_svgdivkit depends on itRenders Scalable Vector Graphics (SVG 1.1) and precompiled vector graphics in Flutter.
- rxdartdivkit depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- cached_network_imagedivkit depends on itLoad and cache network images in Flutter with placeholder and error widget support.
- visibility_detectordivkit depends on itWidget that reports visibility changes of its child