Site-tutorial
Schaduw
StyleShadowContent → toBoxShadow(darkMode). View : uuid_shadow ViewDataString. Shadow suit le borderRadius du decoration.
{
"uuid": "019e8f76-8da2-7669-9fcb-6162546103e2",
"name": "BackCard",
"shadows": [
{
"color": { "dark": "#9de300ec", "light": "#3cd68cf2" },
"alpha": -1,
"offset_x": 0,
"offset_y": 0,
"blur": 6,
"spread": 0
},
{
"color": { "dark": "#91003f9b", "light": "#2414396f" },
"alpha": -1,
"offset_x": 5,
"offset_y": 5,
"blur": 15,
"spread": 0
}
]
}
| Clé | Sens |
|---|---|
alpha | -1 = garder l’alpha du hex. Sinon color.withAlpha(alpha) |
offset_x offset_y | Offset |
blur | blurRadius |
spread | spreadRadius |
"uuid_shadow": { "l": { "i": "019e8f76-8da2-7669-9fcb-6162546103e2" } }
Ombre nulle live "trasparent" uuid 019e92f9-fd2f-7caf-b748-fa784073e752 (alpha 00). Préférer omettre uuid_shadow ({}) si pas d’ombre.
Piège. Radius 0 = ombre rect. Le helper s’appelle
buildGradient (nom historique) mais retourne List<BoxShadow>.