flutterflow-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/build/api/flutterflow.d.ts +11 -0
- package/build/api/flutterflow.js +61 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +54 -0
- package/build/prompts/dev-workflow.d.ts +2 -0
- package/build/prompts/dev-workflow.js +68 -0
- package/build/prompts/generate-page.d.ts +2 -0
- package/build/prompts/generate-page.js +36 -0
- package/build/prompts/inspect-project.d.ts +2 -0
- package/build/prompts/inspect-project.js +30 -0
- package/build/prompts/modify-component.d.ts +2 -0
- package/build/prompts/modify-component.js +39 -0
- package/build/resources/docs.d.ts +2 -0
- package/build/resources/docs.js +76 -0
- package/build/resources/projects.d.ts +3 -0
- package/build/resources/projects.js +60 -0
- package/build/tools/find-component-usages.d.ts +7 -0
- package/build/tools/find-component-usages.js +225 -0
- package/build/tools/find-page-navigations.d.ts +7 -0
- package/build/tools/find-page-navigations.js +228 -0
- package/build/tools/get-component-summary.d.ts +22 -0
- package/build/tools/get-component-summary.js +193 -0
- package/build/tools/get-page-by-name.d.ts +3 -0
- package/build/tools/get-page-by-name.js +56 -0
- package/build/tools/get-page-summary.d.ts +22 -0
- package/build/tools/get-page-summary.js +220 -0
- package/build/tools/get-yaml-docs.d.ts +6 -0
- package/build/tools/get-yaml-docs.js +217 -0
- package/build/tools/get-yaml.d.ts +3 -0
- package/build/tools/get-yaml.js +47 -0
- package/build/tools/list-files.d.ts +3 -0
- package/build/tools/list-files.js +30 -0
- package/build/tools/list-pages.d.ts +25 -0
- package/build/tools/list-pages.js +101 -0
- package/build/tools/list-projects.d.ts +3 -0
- package/build/tools/list-projects.js +19 -0
- package/build/tools/sync-project.d.ts +3 -0
- package/build/tools/sync-project.js +144 -0
- package/build/tools/update-yaml.d.ts +3 -0
- package/build/tools/update-yaml.js +24 -0
- package/build/tools/validate-yaml.d.ts +3 -0
- package/build/tools/validate-yaml.js +22 -0
- package/build/utils/cache.d.ts +48 -0
- package/build/utils/cache.js +162 -0
- package/build/utils/decode-yaml.d.ts +7 -0
- package/build/utils/decode-yaml.js +31 -0
- package/build/utils/page-summary/action-summarizer.d.ts +9 -0
- package/build/utils/page-summary/action-summarizer.js +291 -0
- package/build/utils/page-summary/formatter.d.ts +13 -0
- package/build/utils/page-summary/formatter.js +121 -0
- package/build/utils/page-summary/node-extractor.d.ts +17 -0
- package/build/utils/page-summary/node-extractor.js +207 -0
- package/build/utils/page-summary/tree-walker.d.ts +6 -0
- package/build/utils/page-summary/tree-walker.js +55 -0
- package/build/utils/page-summary/types.d.ts +56 -0
- package/build/utils/page-summary/types.js +4 -0
- package/build/utils/parse-folders.d.ts +9 -0
- package/build/utils/parse-folders.js +29 -0
- package/docs/ff-yaml/00-overview.md +137 -0
- package/docs/ff-yaml/01-project-files.md +513 -0
- package/docs/ff-yaml/02-pages.md +572 -0
- package/docs/ff-yaml/03-components.md +413 -0
- package/docs/ff-yaml/04-widgets/README.md +122 -0
- package/docs/ff-yaml/04-widgets/button.md +444 -0
- package/docs/ff-yaml/04-widgets/container.md +358 -0
- package/docs/ff-yaml/04-widgets/dropdown.md +579 -0
- package/docs/ff-yaml/04-widgets/form.md +256 -0
- package/docs/ff-yaml/04-widgets/image.md +276 -0
- package/docs/ff-yaml/04-widgets/layout.md +355 -0
- package/docs/ff-yaml/04-widgets/misc.md +553 -0
- package/docs/ff-yaml/04-widgets/text-field.md +326 -0
- package/docs/ff-yaml/04-widgets/text.md +302 -0
- package/docs/ff-yaml/05-actions.md +843 -0
- package/docs/ff-yaml/06-variables.md +834 -0
- package/docs/ff-yaml/07-data.md +591 -0
- package/docs/ff-yaml/08-custom-code.md +715 -0
- package/docs/ff-yaml/09-theming.md +592 -0
- package/docs/ff-yaml/10-editing-guide.md +454 -0
- package/docs/ff-yaml/README.md +105 -0
- package/package.json +55 -0
- package/skills/ff-widget-patterns.md +141 -0
- package/skills/ff-yaml-dev.md +58 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
# 09 - Theming and Styling
|
|
2
|
+
|
|
3
|
+
How FlutterFlow stores theme configuration, colors, typography, dimensions, padding, border radius, responsive breakpoints, and Material theme settings in YAML.
|
|
4
|
+
|
|
5
|
+
All examples below are taken from real cached project YAML files.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Theme File Location
|
|
10
|
+
|
|
11
|
+
Theme configuration lives in the `theme.yaml` file at the project root. Material theme settings are in `material-theme.yaml`.
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
theme.yaml # Colors, typography, breakpoints, loading indicator, scrollbar, custom icons
|
|
15
|
+
material-theme.yaml # Material 2 vs Material 3 toggle
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Theme Colors
|
|
21
|
+
|
|
22
|
+
FlutterFlow defines a fixed set of named theme colors. These are referenced throughout widget YAML via `themeColor` instead of hard-coded ARGB values.
|
|
23
|
+
|
|
24
|
+
### Known Theme Color Names
|
|
25
|
+
|
|
26
|
+
| Name | Typical Usage |
|
|
27
|
+
|------|---------------|
|
|
28
|
+
| `PRIMARY` | Primary brand color (buttons, links, accents) |
|
|
29
|
+
| `PRIMARY_TEXT` | Main text color |
|
|
30
|
+
| `PRIMARY_BACKGROUND` | Page/scaffold background |
|
|
31
|
+
| `SECONDARY` | Secondary brand color |
|
|
32
|
+
| `SECONDARY_TEXT` | Subdued text (labels, captions) |
|
|
33
|
+
| `SECONDARY_BACKGROUND` | Card/surface backgrounds |
|
|
34
|
+
| `ALTERNATE` | Borders, dividers, subtle elements |
|
|
35
|
+
| `ERROR` | Error states, validation messages |
|
|
36
|
+
| `INFO` | Informational badges/banners |
|
|
37
|
+
| `SUCCESS` | Success states |
|
|
38
|
+
| `WARNING` | Warning indicators |
|
|
39
|
+
| `ACCENT1` | Custom accent color 1 |
|
|
40
|
+
| `ACCENT2` | Custom accent color 2 |
|
|
41
|
+
| `ACCENT3` | Custom accent color 3 |
|
|
42
|
+
| `ACCENT4` | Custom accent color 4 |
|
|
43
|
+
|
|
44
|
+
### Real usage from cached YAML
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
# Nav bar using theme colors (from nav-bar.yaml)
|
|
48
|
+
themeColor: PRIMARY_BACKGROUND # bar background
|
|
49
|
+
themeColor: PRIMARY # active icon
|
|
50
|
+
themeColor: SECONDARY_TEXT # inactive icon
|
|
51
|
+
|
|
52
|
+
# Scaffold background
|
|
53
|
+
backgroundColorValue:
|
|
54
|
+
inputValue:
|
|
55
|
+
themeColor: PRIMARY_BACKGROUND
|
|
56
|
+
|
|
57
|
+
# Divider color
|
|
58
|
+
colorValue:
|
|
59
|
+
inputValue:
|
|
60
|
+
themeColor: ALTERNATE
|
|
61
|
+
|
|
62
|
+
# Warning icon
|
|
63
|
+
colorValue:
|
|
64
|
+
inputValue:
|
|
65
|
+
themeColor: WARNING
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 2. Color Specification
|
|
71
|
+
|
|
72
|
+
There are exactly two ways to specify a color value in FlutterFlow YAML.
|
|
73
|
+
|
|
74
|
+
### By theme reference
|
|
75
|
+
|
|
76
|
+
References one of the named theme colors. Adapts automatically to light/dark mode.
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
colorValue:
|
|
80
|
+
inputValue:
|
|
81
|
+
themeColor: PRIMARY_TEXT
|
|
82
|
+
mostRecentInputValue:
|
|
83
|
+
themeColor: PRIMARY_TEXT
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### By direct ARGB value
|
|
87
|
+
|
|
88
|
+
A 32-bit integer encoded as a decimal string. Format: `0xAARRGGBB` converted to decimal.
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
colorValue:
|
|
92
|
+
inputValue:
|
|
93
|
+
value: "4284900966"
|
|
94
|
+
mostRecentInputValue:
|
|
95
|
+
value: "4284900966"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**ARGB encoding:** The value is a 32-bit unsigned integer where:
|
|
99
|
+
- Bits 24-31: Alpha (FF = fully opaque = 255)
|
|
100
|
+
- Bits 16-23: Red
|
|
101
|
+
- Bits 8-15: Green
|
|
102
|
+
- Bits 0-7: Blue
|
|
103
|
+
|
|
104
|
+
For example, `4278190080` = `0xFF000000` = fully opaque black.
|
|
105
|
+
|
|
106
|
+
### Loading indicator color (from theme.yaml)
|
|
107
|
+
|
|
108
|
+
The loading indicator uses a slightly different structure with `value` directly (no `inputValue` wrapper):
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
loadingIndicatorStyle:
|
|
112
|
+
type: SK_CHASINGDOTS # or CIRCULAR
|
|
113
|
+
color:
|
|
114
|
+
value: "4287097512"
|
|
115
|
+
diameter: 50
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 3. Typography
|
|
121
|
+
|
|
122
|
+
### Theme Style Names
|
|
123
|
+
|
|
124
|
+
FlutterFlow uses Material Design 3 typography scale names. These are referenced in widget `themeStyle` fields.
|
|
125
|
+
|
|
126
|
+
| Style Name | Typical Size | Typical Weight | Typical Color |
|
|
127
|
+
|------------|-------------|----------------|---------------|
|
|
128
|
+
| `DISPLAY_LARGE` | 64 | w600 | PRIMARY_TEXT |
|
|
129
|
+
| `DISPLAY_MEDIUM` | 44 | w600 | PRIMARY_TEXT |
|
|
130
|
+
| `DISPLAY_SMALL` | 36 | w600 | PRIMARY_TEXT |
|
|
131
|
+
| `HEADLINE_LARGE` | 32 | w600 | PRIMARY_TEXT |
|
|
132
|
+
| `HEADLINE_MEDIUM` | 28 | w600 | PRIMARY_TEXT |
|
|
133
|
+
| `HEADLINE_SMALL` | 24 | w600 | PRIMARY_TEXT |
|
|
134
|
+
| `TITLE_LARGE` | 20 | w600 | PRIMARY_TEXT |
|
|
135
|
+
| `TITLE_MEDIUM` | 18 | w600 | PRIMARY_TEXT |
|
|
136
|
+
| `TITLE_SMALL` | 16 | w600 | PRIMARY_TEXT |
|
|
137
|
+
| `BODY_LARGE` | 16 | w400 | PRIMARY_TEXT |
|
|
138
|
+
| `BODY_MEDIUM` | 14 | w400 | PRIMARY_TEXT |
|
|
139
|
+
| `BODY_SMALL` | 12 | w400 | PRIMARY_TEXT |
|
|
140
|
+
| `LABEL_LARGE` | 16 | w400 | SECONDARY_TEXT |
|
|
141
|
+
| `LABEL_MEDIUM` | 14 | w400 | SECONDARY_TEXT |
|
|
142
|
+
| `LABEL_SMALL` | 12 | w400 | SECONDARY_TEXT |
|
|
143
|
+
|
|
144
|
+
Note: Label styles default to `SECONDARY_TEXT` color, while all others default to `PRIMARY_TEXT`.
|
|
145
|
+
|
|
146
|
+
### Typography definition in theme.yaml
|
|
147
|
+
|
|
148
|
+
Each style is defined under `defaultTypography` with font family, size, color, and weight:
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
# Real structure from zellium-fptpvo/theme.yaml
|
|
152
|
+
defaultTypography:
|
|
153
|
+
primaryFontFamily: Inter
|
|
154
|
+
secondaryFontFamily: Inter
|
|
155
|
+
displaySmall:
|
|
156
|
+
fontFamily: Inter
|
|
157
|
+
isCustomFont: false
|
|
158
|
+
fontSizeValue:
|
|
159
|
+
inputValue: 36
|
|
160
|
+
colorValue:
|
|
161
|
+
inputValue:
|
|
162
|
+
themeColor: PRIMARY_TEXT
|
|
163
|
+
fontWeightValue:
|
|
164
|
+
inputValue: w600
|
|
165
|
+
bodyMedium:
|
|
166
|
+
fontFamily: Inter
|
|
167
|
+
fontSizeValue:
|
|
168
|
+
inputValue: 14
|
|
169
|
+
colorValue:
|
|
170
|
+
inputValue:
|
|
171
|
+
themeColor: PRIMARY_TEXT
|
|
172
|
+
fontWeightValue:
|
|
173
|
+
inputValue: w400
|
|
174
|
+
labelLarge:
|
|
175
|
+
fontFamily: Inter
|
|
176
|
+
fontSizeValue:
|
|
177
|
+
inputValue: 16
|
|
178
|
+
colorValue:
|
|
179
|
+
inputValue:
|
|
180
|
+
themeColor: SECONDARY_TEXT
|
|
181
|
+
fontWeightValue:
|
|
182
|
+
inputValue: w400
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Typography reference in widgets
|
|
186
|
+
|
|
187
|
+
When used in a Text or Button widget, the `themeStyle` field references the style name:
|
|
188
|
+
|
|
189
|
+
```yaml
|
|
190
|
+
# Text widget using theme typography
|
|
191
|
+
props:
|
|
192
|
+
text:
|
|
193
|
+
fontFamily: Open Sans
|
|
194
|
+
themeStyle: BODY_MEDIUM
|
|
195
|
+
isCustomFont: false
|
|
196
|
+
textValue:
|
|
197
|
+
inputValue: Hello World
|
|
198
|
+
fontSizeValue:
|
|
199
|
+
inputValue: 24 # Overrides theme default
|
|
200
|
+
colorValue:
|
|
201
|
+
inputValue:
|
|
202
|
+
themeColor: PRIMARY_TEXT
|
|
203
|
+
fontWeightValue:
|
|
204
|
+
inputValue: w700 # Overrides theme default
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Optional: italic
|
|
208
|
+
|
|
209
|
+
Typography definitions can include an italic flag:
|
|
210
|
+
|
|
211
|
+
```yaml
|
|
212
|
+
displayLarge:
|
|
213
|
+
fontFamily: Inter
|
|
214
|
+
isCustomFont: false
|
|
215
|
+
fontSizeValue:
|
|
216
|
+
inputValue: 64
|
|
217
|
+
colorValue:
|
|
218
|
+
inputValue:
|
|
219
|
+
themeColor: PRIMARY_TEXT
|
|
220
|
+
italicValue:
|
|
221
|
+
inputValue: false
|
|
222
|
+
fontWeightValue:
|
|
223
|
+
inputValue: w600
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## 4. Font Weights
|
|
229
|
+
|
|
230
|
+
Font weights use the Flutter/CSS-style `wXXX` naming:
|
|
231
|
+
|
|
232
|
+
| Value | Name | CSS Equivalent |
|
|
233
|
+
|-------|------|----------------|
|
|
234
|
+
| `w100` | Thin | 100 |
|
|
235
|
+
| `w200` | Extra Light | 200 |
|
|
236
|
+
| `w300` | Light | 300 |
|
|
237
|
+
| `w400` | Normal / Regular | 400 |
|
|
238
|
+
| `w500` | Medium | 500 |
|
|
239
|
+
| `w600` | Semi-Bold | 600 |
|
|
240
|
+
| `w700` | Bold | 700 |
|
|
241
|
+
| `w800` | Extra Bold | 800 |
|
|
242
|
+
| `w900` | Black | 900 |
|
|
243
|
+
|
|
244
|
+
```yaml
|
|
245
|
+
fontWeightValue:
|
|
246
|
+
inputValue: w600
|
|
247
|
+
mostRecentInputValue: w600
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 5. Dimension Patterns
|
|
253
|
+
|
|
254
|
+
Dimensions (width, height) support three modes: fixed pixels, percentage of screen, and fill/expand.
|
|
255
|
+
|
|
256
|
+
### Fixed pixels
|
|
257
|
+
|
|
258
|
+
```yaml
|
|
259
|
+
dimensions:
|
|
260
|
+
width:
|
|
261
|
+
pixelsValue:
|
|
262
|
+
inputValue: 200
|
|
263
|
+
mostRecentInputValue: 200
|
|
264
|
+
height:
|
|
265
|
+
pixelsValue:
|
|
266
|
+
inputValue: 48
|
|
267
|
+
mostRecentInputValue: 48
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Percentage of screen size
|
|
271
|
+
|
|
272
|
+
Uses `percentOfScreenSizeValue` instead of `pixelsValue`. Value is 0-100.
|
|
273
|
+
|
|
274
|
+
```yaml
|
|
275
|
+
# Real example: Container filling 100% of screen (from Container_q7m3k7c9)
|
|
276
|
+
dimensions:
|
|
277
|
+
width:
|
|
278
|
+
percentOfScreenSizeValue:
|
|
279
|
+
inputValue: 100
|
|
280
|
+
height:
|
|
281
|
+
percentOfScreenSizeValue:
|
|
282
|
+
inputValue: 100
|
|
283
|
+
|
|
284
|
+
# Real example: AppBar expanded to 45% of screen height (from AppBar_jb8gbejf)
|
|
285
|
+
expandedHeight:
|
|
286
|
+
percentOfScreenSizeValue:
|
|
287
|
+
inputValue: 45
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Fill available space (Infinity)
|
|
291
|
+
|
|
292
|
+
Setting `pixelsValue` to `Infinity` makes the widget fill all available space along that axis. Commonly used for full-width buttons.
|
|
293
|
+
|
|
294
|
+
```yaml
|
|
295
|
+
# Real example: Full-width button (from Button_jyzzaf1t)
|
|
296
|
+
dimensions:
|
|
297
|
+
width:
|
|
298
|
+
pixelsValue:
|
|
299
|
+
inputValue: Infinity
|
|
300
|
+
height:
|
|
301
|
+
pixelsValue:
|
|
302
|
+
inputValue: 56
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## 6. Padding Patterns
|
|
308
|
+
|
|
309
|
+
Padding uses a `type` field to select the padding mode, plus individual side values.
|
|
310
|
+
|
|
311
|
+
### FF_PADDING_ALL -- Uniform padding on all sides
|
|
312
|
+
|
|
313
|
+
```yaml
|
|
314
|
+
padding:
|
|
315
|
+
type: FF_PADDING_ALL
|
|
316
|
+
allValue:
|
|
317
|
+
inputValue: 8
|
|
318
|
+
mostRecentInputValue: 8
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Real example from `Button_bw3x5gdi`:
|
|
322
|
+
```yaml
|
|
323
|
+
innerPadding:
|
|
324
|
+
type: FF_PADDING_ALL
|
|
325
|
+
allValue:
|
|
326
|
+
inputValue: 8
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### FF_PADDING_ONLY -- Per-side padding
|
|
330
|
+
|
|
331
|
+
Specify any combination of `topValue`, `bottomValue`, `leftValue`, `rightValue`. Omitted sides default to 0.
|
|
332
|
+
|
|
333
|
+
```yaml
|
|
334
|
+
padding:
|
|
335
|
+
type: FF_PADDING_ONLY
|
|
336
|
+
leftValue:
|
|
337
|
+
inputValue: 24
|
|
338
|
+
mostRecentInputValue: 24
|
|
339
|
+
topValue:
|
|
340
|
+
inputValue: 20
|
|
341
|
+
mostRecentInputValue: 20
|
|
342
|
+
rightValue:
|
|
343
|
+
inputValue: 24
|
|
344
|
+
mostRecentInputValue: 24
|
|
345
|
+
bottomValue:
|
|
346
|
+
inputValue: 16
|
|
347
|
+
mostRecentInputValue: 16
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Empty padding
|
|
351
|
+
|
|
352
|
+
A padding object with no values (effectively zero padding on all sides):
|
|
353
|
+
|
|
354
|
+
```yaml
|
|
355
|
+
padding:
|
|
356
|
+
type: FF_PADDING_ONLY
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Or simply:
|
|
360
|
+
|
|
361
|
+
```yaml
|
|
362
|
+
padding: {}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## 7. Border Radius
|
|
368
|
+
|
|
369
|
+
Border radius uses a `type` field similar to padding.
|
|
370
|
+
|
|
371
|
+
### FF_BORDER_RADIUS_ALL -- Uniform radius on all corners
|
|
372
|
+
|
|
373
|
+
Includes both `allValue` and individual corner values. When using `FF_BORDER_RADIUS_ALL`, FlutterFlow stores the value redundantly in both `allValue` and each corner field.
|
|
374
|
+
|
|
375
|
+
```yaml
|
|
376
|
+
# Real example from Button_jyzzaf1t
|
|
377
|
+
borderRadius:
|
|
378
|
+
type: FF_BORDER_RADIUS_ALL
|
|
379
|
+
allValue:
|
|
380
|
+
inputValue: 12
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Full per-corner specification
|
|
384
|
+
|
|
385
|
+
When all corners need the same value, FlutterFlow often stores them redundantly:
|
|
386
|
+
|
|
387
|
+
```yaml
|
|
388
|
+
# Real example from ff-mcp-guide.md Button reference
|
|
389
|
+
borderRadius:
|
|
390
|
+
type: FF_BORDER_RADIUS_ALL
|
|
391
|
+
topLeftValue:
|
|
392
|
+
inputValue: 40
|
|
393
|
+
mostRecentInputValue: 40
|
|
394
|
+
topRightValue:
|
|
395
|
+
inputValue: 40
|
|
396
|
+
mostRecentInputValue: 40
|
|
397
|
+
bottomLeftValue:
|
|
398
|
+
inputValue: 40
|
|
399
|
+
mostRecentInputValue: 40
|
|
400
|
+
bottomRightValue:
|
|
401
|
+
inputValue: 40
|
|
402
|
+
mostRecentInputValue: 40
|
|
403
|
+
allValue:
|
|
404
|
+
inputValue: 40
|
|
405
|
+
mostRecentInputValue: 40
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Individual corner values
|
|
409
|
+
|
|
410
|
+
For non-uniform radii, omit the `allValue` or set different values per corner:
|
|
411
|
+
|
|
412
|
+
```yaml
|
|
413
|
+
borderRadius:
|
|
414
|
+
type: FF_BORDER_RADIUS_ALL
|
|
415
|
+
topLeftValue:
|
|
416
|
+
inputValue: 16
|
|
417
|
+
topRightValue:
|
|
418
|
+
inputValue: 16
|
|
419
|
+
bottomLeftValue:
|
|
420
|
+
inputValue: 0
|
|
421
|
+
bottomRightValue:
|
|
422
|
+
inputValue: 0
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### borderRadiusValue (alternative form)
|
|
426
|
+
|
|
427
|
+
Some widgets (like PageView, LanguageSelector) use `borderRadiusValue` as a simple scalar instead of the structured object:
|
|
428
|
+
|
|
429
|
+
```yaml
|
|
430
|
+
borderRadiusValue:
|
|
431
|
+
inputValue: 12
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 8. Responsive Breakpoints
|
|
437
|
+
|
|
438
|
+
### Breakpoint definitions in theme.yaml
|
|
439
|
+
|
|
440
|
+
Breakpoints define the screen width thresholds for responsive behavior:
|
|
441
|
+
|
|
442
|
+
```yaml
|
|
443
|
+
# From zellium-fptpvo/theme.yaml and local-perks-na36z5/theme.yaml
|
|
444
|
+
breakPoints:
|
|
445
|
+
small: 479 # 0-479px = phone
|
|
446
|
+
medium: 767 # 480-767px = tablet portrait
|
|
447
|
+
large: 991 # 768-991px = tablet landscape / small desktop
|
|
448
|
+
# 992px+ = desktop
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Responsive visibility on widgets
|
|
452
|
+
|
|
453
|
+
Every widget can specify which device categories it should be hidden on. The `responsiveVisibility` object uses boolean flags:
|
|
454
|
+
|
|
455
|
+
```yaml
|
|
456
|
+
# Empty = visible on all devices (most common)
|
|
457
|
+
responsiveVisibility: {}
|
|
458
|
+
|
|
459
|
+
# Hidden on phone only (tablet/desktop image)
|
|
460
|
+
# Real example from Image_ie5duzoz
|
|
461
|
+
responsiveVisibility:
|
|
462
|
+
phoneHidden: true
|
|
463
|
+
|
|
464
|
+
# Hidden on tablet and desktop (phone-only image)
|
|
465
|
+
# Real example from Image_6apkcc2e
|
|
466
|
+
responsiveVisibility:
|
|
467
|
+
tabletHidden: true
|
|
468
|
+
tabletLandscapeHidden: true
|
|
469
|
+
desktopHidden: true
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
### All responsive visibility flags
|
|
473
|
+
|
|
474
|
+
| Flag | Hides on |
|
|
475
|
+
|------|----------|
|
|
476
|
+
| `phoneHidden` | Phone-sized screens (0 - `small` breakpoint) |
|
|
477
|
+
| `tabletHidden` | Tablet portrait (`small` - `medium` breakpoint) |
|
|
478
|
+
| `tabletLandscapeHidden` | Tablet landscape (`medium` - `large` breakpoint) |
|
|
479
|
+
| `desktopHidden` | Desktop screens (above `large` breakpoint) |
|
|
480
|
+
|
|
481
|
+
Each flag is a boolean. When `true`, the widget is hidden on that device category. When `false` or omitted, the widget is visible. An empty `responsiveVisibility: {}` means visible everywhere.
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
## 9. Material Theme
|
|
486
|
+
|
|
487
|
+
The `material-theme.yaml` file controls whether the project uses Material 2 or Material 3 design system.
|
|
488
|
+
|
|
489
|
+
```yaml
|
|
490
|
+
# material-theme.yaml (both zellium and local-perks projects)
|
|
491
|
+
useMaterial2: true
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
| Value | Design System |
|
|
495
|
+
|-------|---------------|
|
|
496
|
+
| `useMaterial2: true` | Material 2 (legacy, current default for most projects) |
|
|
497
|
+
| `useMaterial2: false` | Material 3 (newer, with updated component styles) |
|
|
498
|
+
|
|
499
|
+
This setting affects the visual appearance of all Material widgets (buttons, text fields, switches, etc.) throughout the app.
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## 10. Scrollbar Theme
|
|
504
|
+
|
|
505
|
+
The theme file can also configure the global scrollbar appearance:
|
|
506
|
+
|
|
507
|
+
```yaml
|
|
508
|
+
# From zellium-fptpvo/theme.yaml
|
|
509
|
+
scrollbarTheme:
|
|
510
|
+
thickness: 0
|
|
511
|
+
radius: 0
|
|
512
|
+
thumbColor:
|
|
513
|
+
value: "3789504"
|
|
514
|
+
horizontalScrollbarAlwaysVisible: false
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
## 11. Loading Indicator
|
|
520
|
+
|
|
521
|
+
The loading indicator style is defined at the top of `theme.yaml`:
|
|
522
|
+
|
|
523
|
+
```yaml
|
|
524
|
+
# Zellium project
|
|
525
|
+
loadingIndicatorStyle:
|
|
526
|
+
type: SK_CHASINGDOTS
|
|
527
|
+
color:
|
|
528
|
+
value: "4287097512"
|
|
529
|
+
diameter: 50
|
|
530
|
+
|
|
531
|
+
# Local Perks project
|
|
532
|
+
loadingIndicatorStyle:
|
|
533
|
+
type: CIRCULAR
|
|
534
|
+
color:
|
|
535
|
+
value: "4293800507"
|
|
536
|
+
diameter: 40
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
Known indicator types: `CIRCULAR`, `SK_CHASINGDOTS`.
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## 12. Pull-to-Refresh Theme
|
|
544
|
+
|
|
545
|
+
Some projects define a pull-to-refresh indicator style:
|
|
546
|
+
|
|
547
|
+
```yaml
|
|
548
|
+
# From local-perks-na36z5/theme.yaml
|
|
549
|
+
pullToRefresh:
|
|
550
|
+
refreshIndicatorStyle:
|
|
551
|
+
indicatorColor:
|
|
552
|
+
themeColor: PRIMARY
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
## 13. Custom Icon Families
|
|
558
|
+
|
|
559
|
+
Projects can include custom icon fonts. These are defined in the theme file:
|
|
560
|
+
|
|
561
|
+
```yaml
|
|
562
|
+
customIconFamilys:
|
|
563
|
+
- familyName: Tabler-Icons
|
|
564
|
+
iconFilePath: projects/local-perks-na36z5/assets/eekfihl2k2sd/Tabler-Icons.ttf
|
|
565
|
+
icons:
|
|
566
|
+
- iconName: arrowLeftTail
|
|
567
|
+
codePoint: 59648
|
|
568
|
+
- iconName: brandNetflix
|
|
569
|
+
codePoint: 59649
|
|
570
|
+
# ... potentially hundreds of icons
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
Custom icons are referenced in widgets using their `familyName` and `codePoint` (similar to Material icons but with the custom family name).
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
## Quick Reference: Style Property Patterns
|
|
578
|
+
|
|
579
|
+
| Property | Pattern | Example |
|
|
580
|
+
|----------|---------|---------|
|
|
581
|
+
| Color (theme) | `colorValue.inputValue.themeColor` | `PRIMARY` |
|
|
582
|
+
| Color (literal) | `colorValue.inputValue.value` | `"4278190080"` |
|
|
583
|
+
| Font size | `fontSizeValue.inputValue` | `24` |
|
|
584
|
+
| Font weight | `fontWeightValue.inputValue` | `w600` |
|
|
585
|
+
| Width (px) | `dimensions.width.pixelsValue.inputValue` | `200` |
|
|
586
|
+
| Width (%) | `dimensions.width.percentOfScreenSizeValue.inputValue` | `100` |
|
|
587
|
+
| Width (fill) | `dimensions.width.pixelsValue.inputValue` | `Infinity` |
|
|
588
|
+
| Padding (all) | `padding.type: FF_PADDING_ALL`, `allValue.inputValue` | `8` |
|
|
589
|
+
| Padding (per-side) | `padding.type: FF_PADDING_ONLY`, `leftValue.inputValue` | `24` |
|
|
590
|
+
| Border radius | `borderRadius.type: FF_BORDER_RADIUS_ALL`, `allValue.inputValue` | `12` |
|
|
591
|
+
| Responsive | `responsiveVisibility.phoneHidden` | `true` |
|
|
592
|
+
| Typography | `themeStyle` | `BODY_MEDIUM` |
|