Package com.onec.ui.divkit
Class DivCard
java.lang.Object
com.onec.ui.divkit.DivCard
Wraps a root div in the DivKit document envelope
(
{ templates, card: { log_id, states: [{ state_id, div }] } })
that every official DivKit renderer (Web, iOS, Android, Flutter) consumes.
Runtime variables aren't declared on the card — they're seeded client-side from
the vars map (see ofVars(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, java.lang.Object>)) into a global controller so they can
be streamed via setValue.-
Method Summary
Modifier and TypeMethodDescriptionOne patch change: replace the children (items) of the node withid.A delta payload for a live update: adiv-patch(changes, each replacing the children of a node byid) plus optional streamedvars.Full card plus avarsseed map the client loads into its DivKit variables controller, so@{name}-bound text (e.g.
-
Method Details
-
of
-
ofVars
public static Map<String,Object> ofVars(String logId, Map<String, Object> root, Map<String, Object> vars) Full card plus avarsseed map the client loads into its DivKit variables controller, so@{name}-bound text (e.g. the list count) renders on first paint and can later be streamed viasetValue. -
delta
A delta payload for a live update: adiv-patch(changes, each replacing the children of a node byid) plus optional streamedvars. The client callsapplyPatch+ variablesetValue. -
change
One patch change: replace the children (items) of the node withid.
-