JSON Schema Reference

Complete reference for all 65 built-in widget types supported by Backend-Driven UI.


Table of Contents


Schema Structure

Every widget follows this basic structure:

{
  "type": "WidgetName",
  "props": {
    "property1": "value1",
    "property2": "value2"
  },
  "child": { },
  "children": [ ],
  "action": { },
  "condition": "conditionName"
}
FieldTypeDescription
typeStringRequired. Widget type name
propsObjectWidget properties
childObjectSingle child widget
childrenArrayList of child widgets
actionObjectAction to execute (e.g., on tap)
conditionStringConditional rendering

Scaffold Widgets

Scaffold

Top-level screen structure.

{
  "type": "Scaffold",
  "props": {
    "backgroundColor": "#FFFFFF",
    "resizeToAvoidBottomInset": true,
    "extendBody": false,
    "extendBodyBehindAppBar": false,
    "floatingActionButtonLocation": "endFloat",
    "appBar": { "type": "AppBar", "props": { "title": "My Screen" } },
    "floatingActionButton": { "type": "FloatingActionButton", "props": { "icon": "add" } },
    "bottomNavigationBar": { "type": "BottomNavigationBar", "children": [] },
    "drawer": { "type": "Column", "children": [] }
  },
  "child": { "type": "Column", "children": [] }
}
PropertyTypeDescription
backgroundColorString/NumberScaffold background color
resizeToAvoidBottomInsetBooleanResize body when keyboard appears (default true)
extendBodyBooleanExtend body behind bottom navigation bar (default false)
extendBodyBehindAppBarBooleanExtend body behind app bar (default false)
floatingActionButtonLocationStringcenterFloat, endFloat, centerDocked, endDocked, centerTop, endTop, miniCenterFloat, miniEndFloat, miniCenterDocked, miniEndDocked
appBarWidget schemaAppBar widget rendered as PreferredSizeWidget
floatingActionButtonWidget schemaFAB widget
bottomNavigationBarWidget schemaBottom navigation widget
drawerWidget schemaLeft drawer widget
endDrawerWidget schemaRight drawer widget
bottomSheetWidget schemaPersistent bottom sheet widget

child — the body widget.


AppBar

Material design app bar for use inside Scaffold.

{
  "type": "AppBar",
  "props": {
    "title": "My Screen",
    "centerTitle": true,
    "backgroundColor": "#2196F3",
    "foregroundColor": "#FFFFFF",
    "elevation": 4,
    "automaticallyImplyLeading": true,
    "leading": { "type": "IconButton", "props": { "icon": "menu" } },
    "bottom": { "type": "TabBar", "children": [] }
  },
  "children": []
}
PropertyTypeDescription
titleStringApp bar title text
centerTitleBooleanCenter the title
backgroundColorString/NumberApp bar background color
foregroundColorString/NumberIcon and text color
shadowColorString/NumberShadow color
surfaceTintColorString/NumberSurface tint color
elevationNumberShadow depth
scrolledUnderElevationNumberElevation when content scrolls under
toolbarHeightNumberCustom height
leadingWidthNumberWidth of the leading widget area
titleSpacingNumberHorizontal space around the title
automaticallyImplyLeadingBooleanShow back button automatically (default true)
leadingWidget schemaLeading widget (back button area)
flexibleSpaceWidget schemaWidget behind the toolbar
bottomWidget schemaMust be a PreferredSizeWidget (e.g. TabBar)

children — rendered as actions (right-side icon buttons).


SafeArea

Insets its child to avoid OS intrusions (notch, home bar, status bar).

{
  "type": "SafeArea",
  "props": {
    "top": true,
    "bottom": true,
    "left": true,
    "right": true,
    "minimum": 8
  },
  "child": {}
}
PropertyTypeDescription
topBooleanAvoid top intrusion (default true)
bottomBooleanAvoid bottom intrusion (default true)
leftBooleanAvoid left intrusion (default true)
rightBooleanAvoid right intrusion (default true)
minimumNumber/ObjectMinimum inset padding

Layout Widgets

Column

Vertical layout.

{
  "type": "Column",
  "props": {
    "mainAxisAlignment": "center",
    "crossAxisAlignment": "start",
    "mainAxisSize": "max",
    "clipBehavior": "none"
  },
  "children": []
}
PropertyTypeValues
mainAxisAlignmentStringstart, end, center, spaceBetween, spaceAround, spaceEvenly
crossAxisAlignmentStringstart, end, center, stretch, baseline
mainAxisSizeStringmin, max
clipBehaviorStringnone (default), hardEdge, antiAlias, antiAliasWithSaveLayer

Row

Horizontal layout.

{
  "type": "Row",
  "props": {
    "mainAxisAlignment": "spaceBetween",
    "crossAxisAlignment": "center",
    "clipBehavior": "none"
  },
  "children": []
}

Same properties as Column.


Stack

Overlay widgets on top of each other.

{
  "type": "Stack",
  "props": {
    "alignment": "center",
    "fit": "loose",
    "clipBehavior": "hardEdge"
  },
  "children": []
}
PropertyTypeValues
alignmentStringtopLeft, topCenter, topRight, centerLeft, center, centerRight, bottomLeft, bottomCenter, bottomRight
fitStringloose, expand, passthrough
clipBehaviorStringhardEdge (default), none, antiAlias, antiAliasWithSaveLayer

Positioned

Positions a child at a specific offset inside a Stack.

{
  "type": "Positioned",
  "props": {
    "left": 16,
    "top": 16,
    "right": null,
    "bottom": null,
    "width": 100,
    "height": 50
  },
  "child": {}
}
PropertyTypeDescription
leftNumberDistance from left edge
topNumberDistance from top edge
rightNumberDistance from right edge
bottomNumberDistance from bottom edge
widthNumberFixed width
heightNumberFixed height

Center

Center a child widget.

{
  "type": "Center",
  "child": {}
}

Padding

Add padding around a child.

{
  "type": "Padding",
  "props": {
    "padding": 16,
    "paddingLeft": 8,
    "paddingRight": 8,
    "paddingTop": 12,
    "paddingBottom": 12,
    "paddingHorizontal": 16,
    "paddingVertical": 8
  },
  "child": {}
}
PropertyTypeDescription
paddingNumberAll sides
paddingLeftNumberLeft only
paddingRightNumberRight only
paddingTopNumberTop only
paddingBottomNumberBottom only
paddingHorizontalNumberLeft + Right
paddingVerticalNumberTop + Bottom

Priority: paddingLeft/Right/Top/Bottom > paddingHorizontal/paddingVertical > padding.


SizedBox

Fixed size box or spacer.

{
  "type": "SizedBox",
  "props": {
    "width": 100,
    "height": 50
  },
  "child": {}
}

Container

Box with styling (background, border, padding, gradient, shadow).

{
  "type": "Container",
  "props": {
    "width": 200,
    "height": 100,
    "color": "#FF5733",
    "padding": 16,
    "margin": 8,
    "borderRadius": 8,
    "border": true,
    "borderColor": "#000000",
    "borderWidth": 2,
    "alignment": "center",
    "clipBehavior": "none"
  },
  "child": {}
}
PropertyTypeDescription
widthNumberFixed width
heightNumberFixed height
colorString/NumberBackground color (ignored when gradient is set)
paddingNumber/ObjectInner padding
marginNumber/ObjectOuter margin
borderRadiusNumber/ObjectCorner radius
borderBooleanShow border
borderColorString/NumberBorder color
borderWidthNumberBorder width
alignmentStringChild alignment (topLeft, center, bottomRight, etc.)
clipBehaviorStringnone (default), hardEdge, antiAlias, antiAliasWithSaveLayer
gradientObjectGradient definition (see Gradient section)
boxShadowObject/ArrayShadow(s)
backgroundImageStringNetwork image URL for background
backgroundFitStringfill, contain, cover, fitWidth, fitHeight, none, scaleDown

Expanded

Expand child to fill available space inside Row/Column. Falls back to rendering the child directly if used outside a flex widget.

{
  "type": "Expanded",
  "props": {
    "flex": 2
  },
  "child": {}
}
PropertyTypeDescription
flexNumberFlex factor (default: 1, clamped to 1–99999)

Flexible

Flexible sizing within Row/Column. Falls back to rendering the child directly if used outside a flex widget.

{
  "type": "Flexible",
  "props": {
    "flex": 1,
    "fit": "loose"
  },
  "child": {}
}
PropertyTypeValues
flexNumberFlex factor (default: 1, clamped to 1–99999)
fitStringtight, loose (default: tight)

Wrap

Wrap children to next line when space runs out.

{
  "type": "Wrap",
  "props": {
    "alignment": "start",
    "spacing": 8,
    "runSpacing": 8
  },
  "children": []
}
PropertyTypeValues
alignmentStringstart, end, center, spaceBetween, spaceAround, spaceEvenly
spacingNumberSpace between children
runSpacingNumberSpace between lines

Spacer

Flexible space in Row/Column. Falls back to SizedBox.shrink() if used outside a flex widget.

{
  "type": "Spacer",
  "props": {
    "flex": 1
  }
}

AspectRatio

Maintain aspect ratio.

{
  "type": "AspectRatio",
  "props": {
    "ratio": 1.78
  },
  "child": {}
}
PropertyTypeDescription
ratioNumberWidth/height ratio. Clamped to 0.1–10; invalid values default to 1.0

Display Widgets

Text

Display text with styling.

{
  "type": "Text",
  "props": {
    "text": "Hello World",
    "fontSize": 16,
    "fontWeight": "bold",
    "fontStyle": "italic",
    "color": "#333333",
    "textAlign": "center",
    "maxLines": 2,
    "overflow": "ellipsis",
    "letterSpacing": 1.2,
    "lineHeight": 1.5,
    "decoration": "underline"
  }
}
PropertyTypeValues
textStringRequired. Text content
fontSizeNumberFont size in pixels
fontWeightStringnormal, bold, w100w900
fontStyleStringnormal, italic
colorString/NumberText color (hex, named, or integer)
textAlignStringleft, right, center, justify, start, end
maxLinesNumberMaximum lines
overflowStringclip, fade, ellipsis, visible
decorationStringnone, underline, overline, lineThrough

Icon

Material icon.

{
  "type": "Icon",
  "props": {
    "icon": "favorite",
    "size": 24,
    "color": "#FF0000"
  }
}
PropertyTypeDescription
iconStringMaterial icon name (e.g., home, settings, favorite)
sizeNumberIcon size
colorString/NumberIcon color (hex, named, or integer)

Available icons: home, settings, favorite, star, person, email, phone, message, camera, image, file, folder, download, upload, share, copy, delete, edit, add, remove, check, close, search, menu, arrow_back, arrow_forward, refresh, info, warning, error, help, lock, unlock, visibility, visibility_off


Image

Network image.

{
  "type": "Image",
  "props": {
    "url": "https://example.com/image.jpg",
    "width": 200,
    "height": 150,
    "fit": "cover",
    "borderRadius": 8
  }
}
PropertyTypeValues
urlStringRequired. Image URL
widthNumberImage width
heightNumberImage height
fitStringfill, contain, cover, fitWidth, fitHeight, none, scaleDown
borderRadiusNumberCorner radius

Divider

Horizontal line.

{
  "type": "Divider",
  "props": {
    "height": 1,
    "thickness": 1,
    "color": "#E0E0E0",
    "indent": 16,
    "endIndent": 16
  }
}

CircularProgressIndicator

Circular spinner.

{
  "type": "CircularProgressIndicator",
  "props": {
    "value": 0.7,
    "color": "#2196F3",
    "backgroundColor": "#E3F2FD",
    "strokeWidth": 4.0,
    "strokeCap": "round"
  }
}
PropertyTypeDescription
valueNumber0.0–1.0 for determinate; omit for indeterminate spinner
colorString/NumberProgress arc color
backgroundColorString/NumberTrack color
strokeWidthNumberArc stroke width (default 4.0)
strokeCapStringround, square, butt

LinearProgressIndicator

Horizontal progress bar.

{
  "type": "LinearProgressIndicator",
  "props": {
    "value": 0.5,
    "color": "#2196F3",
    "backgroundColor": "#E3F2FD",
    "minHeight": 4,
    "borderRadius": 4
  }
}
PropertyTypeDescription
valueNumber0.0–1.0 for determinate; omit for indeterminate
colorString/NumberProgress bar color
backgroundColorString/NumberTrack color
minHeightNumberBar height
borderRadiusNumberRounded ends

Material Widgets

Card

Material card with elevation.

{
  "type": "Card",
  "props": {
    "elevation": 4,
    "color": "#FFFFFF",
    "borderRadius": 8,
    "margin": 8,
    "padding": 16
  },
  "child": {}
}

ListTile

Standard list item.

{
  "type": "ListTile",
  "props": {
    "title": "List Item Title",
    "subtitle": "Subtitle text",
    "dense": false,
    "enabled": true
  },
  "action": {}
}

leading and trailing are passed as widget schemas inside props['leading'] and props['trailing'].


CircleAvatar

Circular avatar.

{
  "type": "CircleAvatar",
  "props": {
    "imageUrl": "https://example.com/avatar.jpg",
    "text": "AB",
    "radius": 24,
    "backgroundColor": "#2196F3"
  }
}
PropertyTypeDescription
imageUrlStringAvatar image URL
textStringFallback text (initials)
radiusNumberAvatar radius
backgroundColorString/NumberBackground color

Chip

Tag/label chip.

{
  "type": "Chip",
  "props": {
    "label": "Tag Name",
    "backgroundColor": "#E3F2FD",
    "labelStyle": { "color": "#1976D2" },
    "deleteIcon": "close",
    "avatar": "tag"
  }
}
PropertyTypeDescription
labelStringChip label text
backgroundColorString/NumberBackground color
labelStyleObjectText style map
avatarStringIcon name for the avatar slot
deleteIconStringIcon name for the delete slot
borderColorString/NumberOutline color
borderWidthNumberOutline width

ClipRRect

Rounded corners clip.

{
  "type": "ClipRRect",
  "props": {
    "borderRadius": 16,
    "clipBehavior": "antiAlias"
  },
  "child": {}
}
PropertyTypeDescription
borderRadiusNumberUniform corner radius
clipBehaviorStringantiAlias (default), hardEdge, antiAliasWithSaveLayer, none

FloatingActionButton

Circular action button, typically placed in Scaffold.floatingActionButton.

{
  "type": "FloatingActionButton",
  "props": {
    "icon": "add",
    "label": "New Item",
    "tooltip": "Create",
    "backgroundColor": "#2196F3",
    "foregroundColor": "#FFFFFF",
    "elevation": 6,
    "mini": false
  },
  "action": { "type": "navigate", "route": "/create" }
}
PropertyTypeDescription
iconStringIcon name
labelStringText label — switches to extended FAB when present
tooltipStringLong-press tooltip
backgroundColorString/NumberBackground color
foregroundColorString/NumberIcon/text color
elevationNumberShadow depth
miniBooleanSmaller FAB variant (default false)
heroTagStringCustom Hero tag; use "null" string to disable Hero animation

ExpansionTile

Collapsible tile with children.

{
  "type": "ExpansionTile",
  "props": {
    "title": "Section Title",
    "subtitle": "Optional subtitle",
    "initiallyExpanded": false,
    "maintainState": false,
    "backgroundColor": "#F5F5F5",
    "collapsedBackgroundColor": "#FFFFFF",
    "textColor": "#2196F3",
    "collapsedTextColor": "#333333",
    "iconColor": "#2196F3",
    "collapsedIconColor": "#757575",
    "tilePadding": 16,
    "childrenPadding": 8,
    "dense": false,
    "expandedAlignment": "center",
    "leading": { "type": "Icon", "props": { "icon": "folder" } },
    "trailing": { "type": "Icon", "props": { "icon": "arrow_forward" } }
  },
  "children": [],
  "action": { "type": "custom", "name": "onExpansionChanged" }
}
PropertyTypeDescription
titleStringTile title text
subtitleStringSubtitle below the title
initiallyExpandedBooleanStarts expanded (default false)
maintainStateBooleanKeep children alive when collapsed (default false)
backgroundColorString/NumberBackground when expanded
collapsedBackgroundColorString/NumberBackground when collapsed
textColorString/NumberTitle/subtitle color when expanded
collapsedTextColorString/NumberTitle/subtitle color when collapsed
iconColorString/NumberArrow icon color when expanded
collapsedIconColorString/NumberArrow icon color when collapsed
tilePaddingNumber/ObjectPadding inside the tile header
childrenPaddingNumber/ObjectPadding around the expanded children
denseBooleanReduce vertical padding (default false)
enableFeedbackBooleanEnable haptic/audio feedback
expandedAlignmentStringAlignment of children when expanded (topLeft, center, etc.)
leadingWidget schemaWidget before the title (passed inside props)
trailingWidget schemaWidget after the title (passed inside props)

action — fired on expand/collapse.


Interactive Widgets

Button / ElevatedButton

Elevated button with action.

{
  "type": "ElevatedButton",
  "props": {
    "text": "Click Me",
    "color": "#2196F3",
    "textColor": "#FFFFFF",
    "elevation": 2,
    "borderRadius": 8,
    "padding": 16,
    "disabled": false
  },
  "action": {
    "type": "navigate",
    "route": "/details"
  }
}

TextButton

Flat text button.

{
  "type": "TextButton",
  "props": {
    "text": "Learn More",
    "textColor": "#2196F3"
  },
  "action": {}
}

OutlinedButton

Outlined button.

{
  "type": "OutlinedButton",
  "props": {
    "text": "Cancel",
    "borderColor": "#757575",
    "textColor": "#757575"
  },
  "action": {}
}

IconButton

Icon button.

{
  "type": "IconButton",
  "props": {
    "icon": "favorite",
    "size": 24,
    "color": "#FF0000"
  },
  "action": {}
}

GestureDetector

Tap detection wrapper.

{
  "type": "GestureDetector",
  "action": {
    "type": "navigate",
    "route": "/details"
  },
  "child": {}
}

InkWell

Tap with ripple effect.

{
  "type": "InkWell",
  "props": {
    "borderRadius": 8,
    "splashColor": "#2196F3"
  },
  "action": {},
  "child": {}
}

Input Widgets

TextField

Single or multi-line text input.

{
  "type": "TextField",
  "props": {
    "value": "Initial text",
    "hint": "Enter your name",
    "label": "Name",
    "helperText": "We will never share your name",
    "filled": true,
    "fillColor": "#F5F5F5",
    "borderRadius": 8,
    "obscureText": false,
    "enabled": true,
    "readOnly": false,
    "maxLines": 1,
    "minLines": 1,
    "maxLength": 100,
    "keyboardType": "text",
    "textInputAction": "done",
    "textCapitalization": "sentences",
    "textAlign": "left",
    "cursorColor": "#2196F3",
    "autocorrect": true
  },
  "action": { "type": "custom", "name": "onSubmit" }
}
PropertyTypeValues / Description
valueStringInitial text
hintStringPlaceholder text
labelStringFloating label
helperTextStringHelper text below the field
errorTextStringError text below the field
prefixTextStringText prefix inside the field
suffixTextStringText suffix inside the field
prefixIconStringIcon name for prefix
suffixIconStringIcon name for suffix
filledBooleanFill background (default false)
fillColorString/NumberFill color
borderRadiusNumberCorner radius
obscureTextBooleanHide text (password mode, default false)
enabledBooleanEnable/disable input (default true)
readOnlyBooleanRead-only mode (default false)
maxLinesNumberMaximum lines (default 1; null = unlimited for multiline)
minLinesNumberMinimum lines
maxLengthNumberCharacter limit
keyboardTypeStringtext, number, email, phone, multiline, url, visiblePassword
textInputActionStringdone, next, search, send, go, newline
textCapitalizationStringnone, words, sentences, characters
textAlignStringleft, center, right, justify
cursorColorString/NumberCursor color
cursorWidthNumberCursor width (default 2.0)
autocorrectBooleanEnable autocorrect (default true)
enableSuggestionsBooleanEnable suggestions (default true)
onChangedObjectAction map fired on every keystroke
styleObjectText style map

action — fired when the keyboard action key is pressed (submit).


TextFormField

Like TextField but integrates with Form / FormState for validation.

{
  "type": "TextFormField",
  "props": {
    "hint": "Email address",
    "label": "Email",
    "keyboardType": "email",
    "validators": ["required", "email"]
  }
}

Supports all TextField props, plus:

PropertyTypeDescription
validatorsArrayValidation rules applied in order

Built-in validators:

RuleDescription
"required"Field must not be empty
"email"Must be a valid email address
"numeric"Must be a valid number
"minLength:N"Minimum N characters (e.g. "minLength:8")
"maxLength:N"Maximum N characters

Switch

Toggle between on/off states.

{
  "type": "Switch",
  "props": {
    "value": false,
    "activeColor": "#2196F3",
    "activeTrackColor": "#BBDEFB",
    "inactiveThumbColor": "#BDBDBD",
    "inactiveTrackColor": "#E0E0E0"
  },
  "action": { "type": "custom", "name": "onToggle" }
}
PropertyTypeDescription
valueBooleanInitial state (default false)
activeColorString/NumberThumb color when on
activeTrackColorString/NumberTrack color when on
inactiveThumbColorString/NumberThumb color when off
inactiveTrackColorString/NumberTrack color when off

action — fired on every toggle.


Checkbox

Tick box for boolean selection.

{
  "type": "Checkbox",
  "props": {
    "value": false,
    "tristate": false,
    "activeColor": "#2196F3",
    "checkColor": "#FFFFFF",
    "fillColor": "#2196F3",
    "borderColor": "#BDBDBD",
    "borderWidth": 2,
    "visualDensity": "standard"
  },
  "action": { "type": "custom", "name": "onCheck" }
}
PropertyTypeDescription
valueBooleanInitial state (default false)
tristateBooleanAllow null intermediate state (default false)
activeColorString/NumberFill color when checked
checkColorString/NumberCheck mark color
fillColorString/NumberFill color (overrides activeColor via WidgetStateProperty)
borderColorString/NumberOutline color when unchecked
borderWidthNumberOutline width (default 2.0)
visualDensityStringcompact, comfortable, standard

action — fired on every toggle.


Scrollable Widgets

ListView

Scrollable list (lazy loading).

{
  "type": "ListView",
  "props": {
    "scrollDirection": "vertical",
    "padding": 16,
    "shrinkWrap": true,
    "physics": "bouncing",
    "separator": true,
    "separatorHeight": 1
  },
  "children": []
}
PropertyTypeValues
scrollDirectionStringvertical, horizontal
paddingNumberList padding
shrinkWrapBooleanShrink to content size
physicsStringbouncing, clamping, never, always
separatorBooleanShow dividers between items

Variants: ListView, ListView.builder, ListView.separated, ListView.custom — all accept the same props.


GridView

Scrollable grid.

{
  "type": "GridView",
  "props": {
    "crossAxisCount": 2,
    "mainAxisSpacing": 8,
    "crossAxisSpacing": 8,
    "childAspectRatio": 1.0,
    "padding": 16,
    "shrinkWrap": true
  },
  "children": []
}
PropertyTypeDescription
crossAxisCountNumberColumns count (clamped to 1+)
mainAxisSpacingNumberVertical spacing
crossAxisSpacingNumberHorizontal spacing
childAspectRatioNumberWidth/height ratio (clamped to 0.01+)

Variants: GridView, GridView.builder, GridView.count, GridView.extent, GridView.custom.

Use GridView.extent with maxCrossAxisExtent instead of crossAxisCount for responsive grids.


SingleChildScrollView

Scrollable content.

{
  "type": "SingleChildScrollView",
  "props": {
    "scrollDirection": "vertical",
    "padding": 16,
    "physics": "bouncing"
  },
  "child": {}
}

Sliver Widgets

Sliver widgets must be used inside CustomScrollView.

CustomScrollView

Scrollable area composed of slivers.

{
  "type": "CustomScrollView",
  "props": {
    "scrollDirection": "vertical",
    "reverse": false,
    "shrinkWrap": false,
    "physics": "bouncing"
  },
  "children": [
    { "type": "SliverAppBar", "props": { "title": "My App" } },
    { "type": "SliverList", "children": [] }
  ]
}
PropertyTypeValues
scrollDirectionStringvertical (default), horizontal
reverseBooleanReverse scroll direction (default false)
shrinkWrapBooleanShrink to content size (default false)
physicsStringbouncing, clamping, never

children — must be sliver widgets.


SliverAppBar

Collapsible app bar for use inside CustomScrollView.

{
  "type": "SliverAppBar",
  "props": {
    "title": "My Screen",
    "expandedHeight": 200,
    "floating": false,
    "pinned": true,
    "snap": false,
    "centerTitle": true,
    "backgroundColor": "#2196F3",
    "foregroundColor": "#FFFFFF",
    "elevation": 4
  },
  "child": { "type": "Image", "props": { "url": "https://..." } }
}
PropertyTypeDescription
titleStringApp bar title
expandedHeightNumberHeight when fully expanded
floatingBooleanAppear on scroll up (default false)
pinnedBooleanStay visible when collapsed (default false)
snapBooleanSnap fully visible on partial scroll (requires floating: true)
centerTitleBooleanCenter the title
backgroundColorString/NumberBackground color
foregroundColorString/NumberText/icon color
elevationNumberShadow depth

child — rendered as FlexibleSpaceBar.background (visible in expanded state).


SliverList

Scrollable list inside CustomScrollView.

{
  "type": "SliverList",
  "children": [
    { "type": "ListTile", "props": { "title": "Item 1" } },
    { "type": "ListTile", "props": { "title": "Item 2" } }
  ]
}

Add "id" to a child’s props to use a stable key for that item.


SliverGrid

Scrollable grid inside CustomScrollView.

{
  "type": "SliverGrid",
  "props": {
    "crossAxisCount": 2,
    "mainAxisSpacing": 8,
    "crossAxisSpacing": 8,
    "childAspectRatio": 1.0
  },
  "children": []
}
PropertyTypeDescription
crossAxisCountNumberFixed columns (clamped to 1+)
maxCrossAxisExtentNumberMax item width for responsive layout (alternative to crossAxisCount)
mainAxisSpacingNumberVertical spacing
crossAxisSpacingNumberHorizontal spacing
childAspectRatioNumberWidth/height ratio (clamped to 0.01+)

SliverToBoxAdapter

Wraps a regular (box) widget inside a sliver.

{
  "type": "SliverToBoxAdapter",
  "child": { "type": "Text", "props": { "text": "Header" } }
}

SliverPadding

Adds padding around another sliver.

{
  "type": "SliverPadding",
  "props": {
    "padding": 16
  },
  "child": { "type": "SliverList", "children": [] }
}

SliverFillRemaining

Fills the remaining space in the viewport.

{
  "type": "SliverFillRemaining",
  "props": {
    "hasScrollBody": false,
    "fillOverscroll": false
  },
  "child": {}
}
PropertyTypeDescription
hasScrollBodyBooleanChild is scrollable (default false)
fillOverscrollBooleanExtend fill into overscroll area (default false)

SliverFixedExtentList

List where every item has the same height (more efficient than SliverList for uniform items).

{
  "type": "SliverFixedExtentList",
  "props": {
    "itemExtent": 72
  },
  "children": []
}
PropertyTypeDescription
itemExtentNumberFixed height per item (default 56, clamped to 0.1+)

BottomNavigationBar

Classic bottom tab bar. Requires at least 2 items.

{
  "type": "BottomNavigationBar",
  "props": {
    "currentIndex": 0,
    "type": "fixed",
    "backgroundColor": "#FFFFFF",
    "selectedItemColor": "#2196F3",
    "unselectedItemColor": "#757575",
    "elevation": 8,
    "showSelectedLabels": true,
    "showUnselectedLabels": true
  },
  "children": [
    {
      "type": "Item",
      "props": { "icon": "home", "label": "Home", "activeIcon": "home" },
      "action": { "type": "navigate", "route": "/home" }
    },
    {
      "type": "Item",
      "props": { "icon": "search", "label": "Search" },
      "action": { "type": "navigate", "route": "/search" }
    }
  ]
}

Bar props:

PropertyTypeDescription
currentIndexNumberInitially selected tab index (default 0)
typeStringfixed (default), shifting
backgroundColorString/NumberBar background color
selectedItemColorString/NumberSelected item color
unselectedItemColorString/NumberUnselected item color
elevationNumberShadow depth
iconSizeNumberIcon size (default 24)
selectedFontSizeNumberSelected label font size (default 14)
unselectedFontSizeNumberUnselected label font size (default 12)
showSelectedLabelsBooleanShow selected label (default true)
showUnselectedLabelsBooleanShow unselected labels (default true)

Per-item props (in each child’s props):

PropertyTypeDescription
iconStringIcon name
labelStringTab label
activeIconStringIcon name when selected
backgroundColorString/NumberPer-item background (shifting type only)

Each child’s action is executed when that tab is tapped.


Material 3 bottom navigation bar.

{
  "type": "NavigationBar",
  "props": {
    "selectedIndex": 0,
    "backgroundColor": "#FFFFFF",
    "indicatorColor": "#E3F2FD",
    "elevation": 3,
    "labelBehavior": "alwaysShow"
  },
  "children": [
    {
      "type": "Destination",
      "props": { "icon": "home", "selectedIcon": "home", "label": "Home" },
      "action": { "type": "navigate", "route": "/home" }
    }
  ]
}

Bar props:

PropertyTypeDescription
selectedIndexNumberInitially selected index (default 0)
backgroundColorString/NumberBar background color
indicatorColorString/NumberSelection indicator color
shadowColorString/NumberShadow color
surfaceTintColorString/NumberSurface tint color
elevationNumberShadow depth
heightNumberBar height
animationDurationNumberTransition duration in milliseconds
labelBehaviorStringalwaysShow, alwaysHide, onlyShowSelected

Per-destination props (in each child’s props):

PropertyTypeDescription
iconStringIcon name (unselected)
selectedIconStringIcon name when selected
labelStringDestination label

Each child’s action is executed when that destination is tapped.


DefaultTabController

Provides a TabController to all descendant widgets. Wrap this around a widget tree that contains both a TabBar and a TabBarView.

{
  "type": "DefaultTabController",
  "props": {
    "length": 3,
    "initialIndex": 0
  },
  "child": {
    "type": "Column",
    "children": [
      {
        "type": "TabBar",
        "children": [
          { "type": "Tab", "props": { "text": "Tab 1" } },
          { "type": "Tab", "props": { "text": "Tab 2" } },
          { "type": "Tab", "props": { "text": "Tab 3" } }
        ]
      },
      {
        "type": "Expanded",
        "child": {
          "type": "TabBarView",
          "children": [
            { "type": "Text", "props": { "text": "Page 1" } },
            { "type": "Text", "props": { "text": "Page 2" } },
            { "type": "Text", "props": { "text": "Page 3" } }
          ]
        }
      }
    ]
  }
}
PropertyTypeDescription
lengthNumberRequired. Number of tabs (clamped to 1–999)
initialIndexNumberInitially selected tab (default 0)

TabBar

Row of tabs. Must be a descendant of DefaultTabController.

{
  "type": "TabBar",
  "props": {
    "isScrollable": false,
    "labelColor": "#2196F3",
    "unselectedLabelColor": "#757575",
    "indicatorColor": "#2196F3",
    "indicatorWeight": 2.0,
    "tabAlignment": "fill"
  },
  "children": [
    { "type": "Tab", "props": { "text": "Photos", "icon": "image" } },
    { "type": "Tab", "props": { "text": "Videos", "icon": "camera" } }
  ]
}
PropertyTypeDescription
isScrollableBooleanScrollable tabs (default false)
labelColorString/NumberSelected tab label/icon color
unselectedLabelColorString/NumberUnselected tab color
indicatorColorString/NumberTab indicator color
indicatorWeightNumberIndicator height (default 2.0, clamped to 0.1+)
dividerColorString/NumberDivider line color below the tab bar
paddingNumberTab bar padding
tabAlignmentStringstart, startOffset, fill, center

Per-tab props (in each child’s props):

PropertyTypeDescription
textStringTab label
iconStringIcon name shown above/beside the label

TabBarView

Page view synced with TabBar. Must be a descendant of DefaultTabController.

{
  "type": "TabBarView",
  "props": {
    "physics": "never"
  },
  "children": []
}
PropertyTypeValues
physicsStringnever, bouncing, clamping

children — one widget per tab page. Count must match DefaultTabController.length.


Effect Widgets

Visibility

Show/hide widget.

{
  "type": "Visibility",
  "props": {
    "visible": true,
    "maintainSize": false,
    "maintainState": false
  },
  "child": {}
}

Opacity

Transparency control.

{
  "type": "Opacity",
  "props": {
    "opacity": 0.5
  },
  "child": {}
}
PropertyTypeDescription
opacityNumber0.0–1.0 (clamped)

Actions

Actions define what happens when a user interacts with a widget.

{
  "type": "navigate",
  "route": "/products",
  "arguments": {
    "id": 123
  }
}

Pop

{
  "type": "pop",
  "result": "success"
}

API Call

{
  "type": "api",
  "endpoint": "/api/products",
  "method": "POST",
  "body": {
    "name": "Product"
  },
  "onSuccess": {
    "type": "showSnackBar",
    "message": "Saved!"
  },
  "onError": {
    "type": "showSnackBar",
    "message": "Failed to save"
  }
}

Show Dialog

{
  "type": "showDialog",
  "title": "Confirm",
  "message": "Are you sure?",
  "confirmText": "Yes",
  "cancelText": "No",
  "onConfirm": {
    "type": "api",
    "endpoint": "/api/delete"
  }
}

Show SnackBar

{
  "type": "showSnackBar",
  "message": "Item saved successfully",
  "duration": 3000,
  "actionLabel": "Undo",
  "action": {
    "type": "api",
    "endpoint": "/api/undo"
  }
}

Sequence

Execute multiple actions in order.

{
  "type": "sequence",
  "actions": [
    {"type": "showSnackBar", "message": "Saving..."},
    {"type": "api", "endpoint": "/api/save"},
    {"type": "navigate", "route": "/success"}
  ]
}

Conditional

{
  "type": "conditional",
  "condition": "isAndroid",
  "then": {
    "type": "navigate",
    "route": "/android-page"
  },
  "else": {
    "type": "navigate",
    "route": "/ios-page"
  }
}

Copy

{
  "type": "copy",
  "text": "Text to copy",
  "showFeedback": true,
  "feedbackMessage": "Copied!"
}

Custom

{
  "type": "custom",
  "name": "myCustomAction",
  "params": {
    "key": "value"
  }
}

Conditions

Conditions control when widgets are rendered.

ConditionDescription
isAndroidAndroid platform
isIOSiOS platform
isMobileAndroid or iOS
isWebWeb platform
isDesktopDesktop (Windows, macOS, Linux)
isSmallScreenWidth < 600px
isMediumScreen600px ≤ Width < 1200px
isLargeScreenWidth ≥ 1200px
isDarkModeDark theme active
isLightModeLight theme active

Usage:

{
  "type": "Text",
  "props": {
    "text": "Only visible on mobile"
  },
  "condition": "isMobile"
}

Color Formats

Four formats are accepted wherever a color prop appears:

FormatExampleNotes
Named"color": "blue"All Flutter Colors.* names (e.g. red, green, amber)
Colors.x"color": "Colors.deepPurple"Flutter dot-notation directly
Hex #RRGGBB"color": "#1976D2"Standard CSS hex, fully opaque
Hex #AARRGGBB"color": "#FF1976D2"With alpha channel
Integer"color": 4278190080Raw Flutter ARGB int (0xFF000000)

Material shade names are also supported — append the shade number to the color name:

"red50", "red100" … "red900"
"blue50", "blue100" … "blue900"
"deepPurple200", "teal400", "amber700" …

CSS color names (navy, coral, gold, salmon, teal, olive, maroon, violet, indigo, crimson, turquoise, skyblue, hotpink, lime, aqua, fuchsia, silver, gray / grey, …) are recognized as well.

Common colors quick reference:

ColorNamedHex
Black"black""#000000"
White"white""#FFFFFF"
Red"red""#FF0000"
Blue"blue""#0000FF"
Green"green""#00FF00"
Grey"grey""#9E9E9E"
Transparent"transparent""#00000000"

Best Practices

  1. Keep schemas simple - Avoid deeply nested structures
  2. Use conditions sparingly - Prefer responsive layouts over conditional widgets
  3. Cache aggressively - Use cacheDuration for stable content
  4. Handle errors - Always provide onError for API actions
  5. Test on all platforms - Verify conditions work as expected

Built with Backend-Driven UI