AYLICRÉA El tuto
AYLICRÉA

Tuto Site

ViewContent

Un view est folder (moteur layout + enfants) ou leaf (widget typé). Jamais les deux : le type décide. Live : ViewContent.fromJson (view_content.dart). Renderer : ViewPreView uniquement.

Ordre de travail — arguments fromJson

IDENTITÉ     x, id, odr, uuid, origin, track_choice
ARBRE        uuid_page, uuid_folder, uuid_copy, name
STYLE REF    uuid_theme, uuid_gradient, uuid_gradient_int, uuid_shadow
CLICK        uuid_action[]
LINK         link, uuid_link, uuid_links[]
COUCHE       layer, pop
TYPE         type, type_m
DATA TYPÉE   market, category, product
BOX          width, height, width_int, height_int
PLACE        rota, center, pos, dx, dy
MARGE        pad, pad_int
ALIGN        axis_size, axis_align, cross_align, direction_align
CHROME       color_main, border, radius
TEXTE        title, subtitle, style_title, style_subtitle
LEVEL        level, blur_ini, blur_ena
MEDIA        box_fit, box_fit_m, image_pos, image_pos_m, image, image_m, images, video, icon
NAV          path, query
FLAGS        tel, mail, when_*, enable, desktop, mobile, theme[], platform[], locale[], loc_text
TIME         time_link, time_private, time_video, time_start, time_end, time   (ms)
EXTRA        data, latlng

from_uuid_copy est runtime only (rewrite copy). Ne pas l’émettre dans le JSON auteur.

Encodeurs — ne pas inverser

CléEncodeDéfaut / loi
uuid_theme (view){"l":{"i":"<uuid>"}}ViewDataString, pas string nue
style_titlestring uuidStyleTextContent
uuid_actionstring[]ordre d’exécution au tap
layerintlive 1 par défaut utile (fromJson 0 si omis)
pop0|10 flow · 1 overlay
typeuuid cataloguevide → id_space
type_muuid ou ""vide → type
image_m images[]string / []NOT USE sur view
image_posint−1 arrière · 0 haut · 1 gauche · 2 droite · 3 bas

Squelette JSON sûr

Copier, puis remplir type / uuid_folder / width / title.

{
  "id": 0,
  "odr": 1,
  "uuid": "<v7>",
  "origin": "",
  "track_choice": "",
  "uuid_page": "<page>",
  "uuid_folder": "",
  "uuid_copy": "",
  "name": "",
  "uuid_theme": {},
  "uuid_gradient": {},
  "uuid_gradient_int": {},
  "uuid_shadow": {},
  "uuid_action": [],
  "link": "",
  "uuid_link": "",
  "uuid_links": [],
  "layer": 1,
  "type": "<uuid catalogue>",
  "type_m": "",
  "width": { "l": { "i": 100, "iT": "%" } },
  "height": { "l": { "i": 0 } },
  "width_int": {},
  "height_int": {},
  "rota": {},
  "center": {},
  "pos": {},
  "dx": {},
  "dy": {},
  "pad": {},
  "pad_int": {},
  "axis_size": {},
  "axis_align": {},
  "cross_align": {},
  "direction_align": {},
  "color_main": "",
  "border": {},
  "radius": {},
  "title": {},
  "subtitle": {},
  "style_title": "",
  "style_subtitle": "",
  "level": 0,
  "blur_ini": -1,
  "blur_ena": -1,
  "box_fit": 2,
  "box_fit_m": 2,
  "image_pos": 0,
  "image_pos_m": 0,
  "image": "",
  "image_m": "",
  "images": [],
  "video": "",
  "icon": 984250,
  "path": "",
  "query": "",
  "pop": 0,
  "tel": 0,
  "mail": 0,
  "when_title": 0,
  "when_subtitle": 0,
  "when_child": 0,
  "enable": 1,
  "desktop": 1,
  "mobile": 1,
  "theme": [],
  "platform": [],
  "locale": [],
  "loc_text": "",
  "time_link": "",
  "time_private": 0,
  "time_video": 0,
  "time_start": 0,
  "time_end": 0,
  "time": 0,
  "data": "",
  "latlng": []
}

Dispatch viewWidget

typeAuto = getTypeAuto : space → FolderBasic (sizeFolderDeco + pageFolder) → FolderNoHeight → FolderAnimated → id_page nested ShowPageSite → leaves → unknown → SizedBox.shrink(). Type hors catalogue = invisible. id_copy n’est pas dans viewWidget : géré en tête de build.

Piège. Toujours enable:1 desktop:1 mobile:1 layer:1 pop:0. Ne pas émettre from_uuid_copy. Les blocs market / category / product du payload live peuvent être omis pour un text/button/folder.