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,256 @@
|
|
|
1
|
+
# Form
|
|
2
|
+
|
|
3
|
+
The Form widget wraps child TextField widgets and defines validation rules for each referenced field via `nodeKeyRef`.
|
|
4
|
+
|
|
5
|
+
## Minimal Example
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
key: Form_xxxxxxxx
|
|
9
|
+
type: Form
|
|
10
|
+
props:
|
|
11
|
+
form:
|
|
12
|
+
validations:
|
|
13
|
+
- isRequired: true
|
|
14
|
+
text:
|
|
15
|
+
isRequiredFailMsg:
|
|
16
|
+
textValue:
|
|
17
|
+
inputValue: Field is required
|
|
18
|
+
nodeKeyRef:
|
|
19
|
+
key: TextField_xxxxxxxx
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Full Schema
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
key: Form_xxxxxxxx
|
|
26
|
+
type: Form
|
|
27
|
+
props:
|
|
28
|
+
form:
|
|
29
|
+
validations: # Array of field validations
|
|
30
|
+
- isRequired: true # Whether field must have a value
|
|
31
|
+
text: # Text-specific validation rules
|
|
32
|
+
isRequiredFailMsg: # Error when field is empty
|
|
33
|
+
translationIdentifier:
|
|
34
|
+
key: thtawt3t # i18n key
|
|
35
|
+
textValue:
|
|
36
|
+
inputValue: Email is required
|
|
37
|
+
emailRegex: true # Validate as email format
|
|
38
|
+
invalidTextFailMsg: # Error when format is invalid
|
|
39
|
+
translationIdentifier:
|
|
40
|
+
key: 83p8ztr3
|
|
41
|
+
textValue:
|
|
42
|
+
inputValue: Invalid email
|
|
43
|
+
minimumCharacters: 8 # Minimum character count
|
|
44
|
+
minimumCharactersFailMsg: # Error when too short
|
|
45
|
+
translationIdentifier:
|
|
46
|
+
key: sbu1wvm2
|
|
47
|
+
textValue:
|
|
48
|
+
inputValue: Password should be at least 8 characters
|
|
49
|
+
selectedOptionFailMsg: # Error for dropdown validation
|
|
50
|
+
translationIdentifier:
|
|
51
|
+
key: z5j1zitb
|
|
52
|
+
textValue:
|
|
53
|
+
inputValue: Please choose an option from the dropdown
|
|
54
|
+
nodeKeyRef: # Reference to the TextField being validated
|
|
55
|
+
key: TextField_mxlvp4hj # Must match a child TextField's key
|
|
56
|
+
autovalidateMode: DISABLED # When to run validation (see enum)
|
|
57
|
+
name: CreateAccountForm # Human-readable name
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Field Reference
|
|
61
|
+
|
|
62
|
+
| Field | Type | Required | Notes |
|
|
63
|
+
|-------|------|----------|-------|
|
|
64
|
+
| `validations` | array | Yes | List of validation rules |
|
|
65
|
+
| `validations[].isRequired` | bool | Yes | Whether field is mandatory |
|
|
66
|
+
| `validations[].nodeKeyRef.key` | string | Yes | Key of TextField being validated |
|
|
67
|
+
| `validations[].text.isRequiredFailMsg.textValue.inputValue` | string | No | Required field error message |
|
|
68
|
+
| `validations[].text.emailRegex` | bool | No | Enable email format validation |
|
|
69
|
+
| `validations[].text.invalidTextFailMsg.textValue.inputValue` | string | No | Invalid format error message |
|
|
70
|
+
| `validations[].text.minimumCharacters` | number | No | Minimum character count |
|
|
71
|
+
| `validations[].text.minimumCharactersFailMsg.textValue.inputValue` | string | No | Too-short error message |
|
|
72
|
+
| `validations[].text.selectedOptionFailMsg.textValue.inputValue` | string | No | Dropdown selection error |
|
|
73
|
+
| `autovalidateMode` | enum | No | When validation runs |
|
|
74
|
+
|
|
75
|
+
## autovalidateMode Enum
|
|
76
|
+
|
|
77
|
+
| Value | Description |
|
|
78
|
+
|-------|-------------|
|
|
79
|
+
| `DISABLED` | Validate only when form is submitted |
|
|
80
|
+
| `ALWAYS` | Validate on every change |
|
|
81
|
+
| `ON_USER_INTERACTION` | Validate after first user interaction |
|
|
82
|
+
|
|
83
|
+
## Validation Rule Patterns
|
|
84
|
+
|
|
85
|
+
### Email validation
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
- isRequired: true
|
|
89
|
+
text:
|
|
90
|
+
isRequiredFailMsg:
|
|
91
|
+
translationIdentifier:
|
|
92
|
+
key: auto_key
|
|
93
|
+
textValue:
|
|
94
|
+
inputValue: Email is required
|
|
95
|
+
emailRegex: true
|
|
96
|
+
invalidTextFailMsg:
|
|
97
|
+
translationIdentifier:
|
|
98
|
+
key: auto_key
|
|
99
|
+
textValue:
|
|
100
|
+
inputValue: Invalid email
|
|
101
|
+
selectedOptionFailMsg:
|
|
102
|
+
translationIdentifier:
|
|
103
|
+
key: auto_key
|
|
104
|
+
textValue:
|
|
105
|
+
inputValue: Please choose an option from the dropdown
|
|
106
|
+
nodeKeyRef:
|
|
107
|
+
key: TextField_xxxxxxxx
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Password validation (minimum length)
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
- isRequired: true
|
|
114
|
+
text:
|
|
115
|
+
minimumCharacters: 8
|
|
116
|
+
isRequiredFailMsg:
|
|
117
|
+
translationIdentifier:
|
|
118
|
+
key: auto_key
|
|
119
|
+
textValue:
|
|
120
|
+
inputValue: Password is required
|
|
121
|
+
minimumCharactersFailMsg:
|
|
122
|
+
translationIdentifier:
|
|
123
|
+
key: auto_key
|
|
124
|
+
textValue:
|
|
125
|
+
inputValue: Password should be at least 8 characters
|
|
126
|
+
selectedOptionFailMsg:
|
|
127
|
+
translationIdentifier:
|
|
128
|
+
key: auto_key
|
|
129
|
+
textValue:
|
|
130
|
+
inputValue: Please choose an option from the dropdown
|
|
131
|
+
nodeKeyRef:
|
|
132
|
+
key: TextField_xxxxxxxx
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Real Examples
|
|
136
|
+
|
|
137
|
+
**Sign-up form with email + password + confirm password:**
|
|
138
|
+
```yaml
|
|
139
|
+
key: Form_jc5tby3y
|
|
140
|
+
type: Form
|
|
141
|
+
props:
|
|
142
|
+
form:
|
|
143
|
+
validations:
|
|
144
|
+
- isRequired: true
|
|
145
|
+
text:
|
|
146
|
+
isRequiredFailMsg:
|
|
147
|
+
translationIdentifier:
|
|
148
|
+
key: thtawt3t
|
|
149
|
+
textValue:
|
|
150
|
+
inputValue: Email is required
|
|
151
|
+
emailRegex: true
|
|
152
|
+
invalidTextFailMsg:
|
|
153
|
+
translationIdentifier:
|
|
154
|
+
key: 83p8ztr3
|
|
155
|
+
textValue:
|
|
156
|
+
inputValue: Invalid email
|
|
157
|
+
selectedOptionFailMsg:
|
|
158
|
+
translationIdentifier:
|
|
159
|
+
key: z5j1zitb
|
|
160
|
+
textValue:
|
|
161
|
+
inputValue: Please choose an option from the dropdown
|
|
162
|
+
nodeKeyRef:
|
|
163
|
+
key: TextField_mxlvp4hj
|
|
164
|
+
- isRequired: true
|
|
165
|
+
text:
|
|
166
|
+
minimumCharacters: 8
|
|
167
|
+
isRequiredFailMsg:
|
|
168
|
+
translationIdentifier:
|
|
169
|
+
key: boujkpn4
|
|
170
|
+
textValue:
|
|
171
|
+
inputValue: Password is required
|
|
172
|
+
minimumCharactersFailMsg:
|
|
173
|
+
translationIdentifier:
|
|
174
|
+
key: sbu1wvm2
|
|
175
|
+
textValue:
|
|
176
|
+
inputValue: Password should be at least 8 characters
|
|
177
|
+
selectedOptionFailMsg:
|
|
178
|
+
translationIdentifier:
|
|
179
|
+
key: z2z1i4c2
|
|
180
|
+
textValue:
|
|
181
|
+
inputValue: Please choose an option from the dropdown
|
|
182
|
+
nodeKeyRef:
|
|
183
|
+
key: TextField_3pu6ien6
|
|
184
|
+
- isRequired: true
|
|
185
|
+
text:
|
|
186
|
+
minimumCharacters: 8
|
|
187
|
+
isRequiredFailMsg:
|
|
188
|
+
translationIdentifier:
|
|
189
|
+
key: ymma4cep
|
|
190
|
+
textValue:
|
|
191
|
+
inputValue: Confirm Password is required
|
|
192
|
+
minimumCharactersFailMsg:
|
|
193
|
+
translationIdentifier:
|
|
194
|
+
key: k7uzg7kn
|
|
195
|
+
textValue:
|
|
196
|
+
inputValue: Password should be at least 8 characters
|
|
197
|
+
selectedOptionFailMsg:
|
|
198
|
+
translationIdentifier:
|
|
199
|
+
key: 470x2tex
|
|
200
|
+
textValue:
|
|
201
|
+
inputValue: Please choose an option from the dropdown
|
|
202
|
+
nodeKeyRef:
|
|
203
|
+
key: TextField_ym8v4ctz
|
|
204
|
+
autovalidateMode: DISABLED
|
|
205
|
+
name: CreateAccountForm
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Login form with email + password:**
|
|
209
|
+
```yaml
|
|
210
|
+
key: Form_qmq6g118
|
|
211
|
+
type: Form
|
|
212
|
+
props:
|
|
213
|
+
form:
|
|
214
|
+
validations:
|
|
215
|
+
- isRequired: true
|
|
216
|
+
text:
|
|
217
|
+
isRequiredFailMsg:
|
|
218
|
+
translationIdentifier:
|
|
219
|
+
key: jnz0yqtb
|
|
220
|
+
textValue:
|
|
221
|
+
inputValue: Email is required
|
|
222
|
+
emailRegex: true
|
|
223
|
+
invalidTextFailMsg:
|
|
224
|
+
translationIdentifier:
|
|
225
|
+
key: 35qqmeq4
|
|
226
|
+
textValue:
|
|
227
|
+
inputValue: Invalid email
|
|
228
|
+
selectedOptionFailMsg:
|
|
229
|
+
translationIdentifier:
|
|
230
|
+
key: 3aimkf7e
|
|
231
|
+
textValue:
|
|
232
|
+
inputValue: Please choose an option from the dropdown
|
|
233
|
+
nodeKeyRef:
|
|
234
|
+
key: TextField_7g4icdhe
|
|
235
|
+
- isRequired: true
|
|
236
|
+
text:
|
|
237
|
+
minimumCharacters: 8
|
|
238
|
+
isRequiredFailMsg:
|
|
239
|
+
translationIdentifier:
|
|
240
|
+
key: 8sr1xmz2
|
|
241
|
+
textValue:
|
|
242
|
+
inputValue: Password is required
|
|
243
|
+
minimumCharactersFailMsg:
|
|
244
|
+
translationIdentifier:
|
|
245
|
+
key: x694lubx
|
|
246
|
+
textValue:
|
|
247
|
+
inputValue: Password should be at least 8 characters
|
|
248
|
+
selectedOptionFailMsg:
|
|
249
|
+
translationIdentifier:
|
|
250
|
+
key: ki9hw1nd
|
|
251
|
+
textValue:
|
|
252
|
+
inputValue: Please choose an option from the dropdown
|
|
253
|
+
nodeKeyRef:
|
|
254
|
+
key: TextField_z7y35e2t
|
|
255
|
+
name: LogInForm
|
|
256
|
+
```
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# Image
|
|
2
|
+
|
|
3
|
+
## Minimal Example
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
key: Image_xxxxxxxx
|
|
7
|
+
type: Image
|
|
8
|
+
props:
|
|
9
|
+
image:
|
|
10
|
+
type: FF_IMAGE_TYPE_ASSET
|
|
11
|
+
fit: FF_BOX_FIT_COVER
|
|
12
|
+
pathValue:
|
|
13
|
+
inputValue: projects/my-project/assets/xxxxx/image.png
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Full Schema
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
key: Image_xxxxxxxx
|
|
20
|
+
type: Image
|
|
21
|
+
props:
|
|
22
|
+
image:
|
|
23
|
+
type: FF_IMAGE_TYPE_ASSET # Image source type (see enum)
|
|
24
|
+
fit: FF_BOX_FIT_COVER # How image fits its box (see enum)
|
|
25
|
+
dimensions: # Image display size
|
|
26
|
+
width:
|
|
27
|
+
pixelsValue:
|
|
28
|
+
inputValue: 150
|
|
29
|
+
height:
|
|
30
|
+
pixelsValue:
|
|
31
|
+
inputValue: 70
|
|
32
|
+
borderRadius: # Corner radius
|
|
33
|
+
type: FF_BORDER_RADIUS_ALL # FF_BORDER_RADIUS_ALL or FF_BORDER_RADIUS_ONLY
|
|
34
|
+
allValue:
|
|
35
|
+
inputValue: 8
|
|
36
|
+
topLeftValue: # Per-corner values (with ONLY type)
|
|
37
|
+
inputValue: 8
|
|
38
|
+
mostRecentInputValue: 8
|
|
39
|
+
topRightValue:
|
|
40
|
+
inputValue: 8
|
|
41
|
+
mostRecentInputValue: 8
|
|
42
|
+
bottomLeftValue:
|
|
43
|
+
inputValue: 8
|
|
44
|
+
mostRecentInputValue: 8
|
|
45
|
+
bottomRightValue:
|
|
46
|
+
inputValue: 8
|
|
47
|
+
mostRecentInputValue: 8
|
|
48
|
+
cached: true # Cache network images
|
|
49
|
+
cacheFadeDuration: 500 # Fade-in duration for cached images (ms)
|
|
50
|
+
showErrorImage: true # Show placeholder on error
|
|
51
|
+
pathValue: # Image path/URL
|
|
52
|
+
inputValue: projects/zellium-fptpvo/assets/4irp4lk9qgkw/logo.png
|
|
53
|
+
# OR for network images, a variable binding:
|
|
54
|
+
# variable:
|
|
55
|
+
# source: FIRESTORE_REQUEST
|
|
56
|
+
# baseVariable:
|
|
57
|
+
# firestore: {}
|
|
58
|
+
# operations:
|
|
59
|
+
# - accessDocumentField:
|
|
60
|
+
# fieldIdentifier:
|
|
61
|
+
# name: LogoURL
|
|
62
|
+
# nodeKeyRef:
|
|
63
|
+
# key: ListView_c6q77t1v
|
|
64
|
+
# uiBuilderValue:
|
|
65
|
+
# serializedValue: https://picsum.photos/seed/733/600
|
|
66
|
+
# mostRecentInputValue: https://picsum.photos/seed/733/600
|
|
67
|
+
darkModePath: projects/zellium-fptpvo/assets/n4nm8ioujlxm/logo_dark.png # Dark mode asset
|
|
68
|
+
hasDarkModeAsset: true # Whether dark mode asset exists
|
|
69
|
+
format: FF_IMAGE_FORMAT_AUTO # Image format hint
|
|
70
|
+
localFileVariable: {} # For local file picker images
|
|
71
|
+
padding: # Common padding prop
|
|
72
|
+
type: FF_PADDING_ONLY
|
|
73
|
+
topValue:
|
|
74
|
+
inputValue: 16
|
|
75
|
+
mostRecentInputValue: 16
|
|
76
|
+
bottomValue:
|
|
77
|
+
inputValue: 32
|
|
78
|
+
mostRecentInputValue: 32
|
|
79
|
+
alignment: # Position within parent
|
|
80
|
+
xValue:
|
|
81
|
+
inputValue: 0
|
|
82
|
+
yValue:
|
|
83
|
+
inputValue: 0
|
|
84
|
+
responsiveVisibility: # Breakpoint visibility
|
|
85
|
+
phoneHidden: true # Hidden on phone
|
|
86
|
+
tabletHidden: true # Hidden on tablet
|
|
87
|
+
tabletLandscapeHidden: true
|
|
88
|
+
desktopHidden: true
|
|
89
|
+
opacity:
|
|
90
|
+
opacityValue:
|
|
91
|
+
inputValue: 1
|
|
92
|
+
mostRecentInputValue: 1
|
|
93
|
+
name: mobile_image # Human-readable name
|
|
94
|
+
parameterValues: {}
|
|
95
|
+
valueKey: {}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Field Reference
|
|
99
|
+
|
|
100
|
+
| Field | Type | Required | Notes |
|
|
101
|
+
|-------|------|----------|-------|
|
|
102
|
+
| `type` | enum | Yes | Image source type |
|
|
103
|
+
| `fit` | enum | No | How image fits its container |
|
|
104
|
+
| `dimensions.width.pixelsValue.inputValue` | number | No | Display width in px |
|
|
105
|
+
| `dimensions.height.pixelsValue.inputValue` | number | No | Display height in px |
|
|
106
|
+
| `borderRadius` | object | No | Corner rounding |
|
|
107
|
+
| `cached` | bool | No | Cache network images |
|
|
108
|
+
| `cacheFadeDuration` | number | No | Fade animation duration in ms |
|
|
109
|
+
| `showErrorImage` | bool | No | Show error placeholder |
|
|
110
|
+
| `pathValue.inputValue` | string | Yes | Asset path or URL (literal or variable) |
|
|
111
|
+
| `darkModePath` | string | No | Alternate asset for dark mode |
|
|
112
|
+
| `hasDarkModeAsset` | bool | No | Whether dark mode variant exists |
|
|
113
|
+
| `format` | enum | No | Image format hint |
|
|
114
|
+
| `localFileVariable` | object | No | For file picker results |
|
|
115
|
+
|
|
116
|
+
## type Enum
|
|
117
|
+
|
|
118
|
+
| Value | Description |
|
|
119
|
+
|-------|-------------|
|
|
120
|
+
| `FF_IMAGE_TYPE_ASSET` | FlutterFlow project asset (stored in project assets) |
|
|
121
|
+
| `FF_IMAGE_TYPE_NETWORK` | Network URL image |
|
|
122
|
+
|
|
123
|
+
## fit Enum
|
|
124
|
+
|
|
125
|
+
| Value | Description |
|
|
126
|
+
|-------|-------------|
|
|
127
|
+
| `FF_BOX_FIT_COVER` | Cover the box, may crop |
|
|
128
|
+
| `FF_BOX_FIT_CONTAIN` | Fit inside the box, may letterbox |
|
|
129
|
+
| `FF_BOX_FIT_FILL` | Stretch to fill (may distort) |
|
|
130
|
+
| `FF_BOX_FIT_FIT_WIDTH` | Fit width, may crop height |
|
|
131
|
+
| `FF_BOX_FIT_FIT_HEIGHT` | Fit height, may crop width |
|
|
132
|
+
| `FF_BOX_FIT_NONE` | No scaling |
|
|
133
|
+
| `FF_BOX_FIT_SCALE_DOWN` | Scale down only, never up |
|
|
134
|
+
|
|
135
|
+
## format Enum
|
|
136
|
+
|
|
137
|
+
| Value | Description |
|
|
138
|
+
|-------|-------------|
|
|
139
|
+
| `FF_IMAGE_FORMAT_AUTO` | Auto-detect format |
|
|
140
|
+
|
|
141
|
+
## Asset Path Pattern
|
|
142
|
+
|
|
143
|
+
FlutterFlow asset paths follow this format:
|
|
144
|
+
```
|
|
145
|
+
projects/{project-slug}/assets/{asset-id}/{filename}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Example: `projects/zellium-fptpvo/assets/4irp4lk9qgkw/Zellium_-_full_logo_-_white-1.png`
|
|
149
|
+
|
|
150
|
+
SVG files are also supported: `projects/local-perks-na36z5/assets/rho4dig9lgan/PerksPass_red_logo.svg`
|
|
151
|
+
|
|
152
|
+
## Real Examples
|
|
153
|
+
|
|
154
|
+
**Asset image with dark mode variant:**
|
|
155
|
+
```yaml
|
|
156
|
+
key: Image_wu74cv76
|
|
157
|
+
type: Image
|
|
158
|
+
props:
|
|
159
|
+
image:
|
|
160
|
+
type: FF_IMAGE_TYPE_ASSET
|
|
161
|
+
fit: FF_BOX_FIT_COVER
|
|
162
|
+
dimensions:
|
|
163
|
+
width:
|
|
164
|
+
pixelsValue:
|
|
165
|
+
inputValue: 150
|
|
166
|
+
height:
|
|
167
|
+
pixelsValue:
|
|
168
|
+
inputValue: 70
|
|
169
|
+
borderRadius:
|
|
170
|
+
type: FF_BORDER_RADIUS_ONLY
|
|
171
|
+
allValue:
|
|
172
|
+
inputValue: 8
|
|
173
|
+
darkModePath: projects/zellium-fptpvo/assets/n4nm8ioujlxm/Zellium_-_full_logo_-_white.png
|
|
174
|
+
hasDarkModeAsset: true
|
|
175
|
+
cacheFadeDuration: 500
|
|
176
|
+
pathValue:
|
|
177
|
+
inputValue: projects/zellium-fptpvo/assets/4irp4lk9qgkw/Zellium_-_full_logo_-_white-1.png
|
|
178
|
+
format: FF_IMAGE_FORMAT_AUTO
|
|
179
|
+
name: ImageLogo
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Network image from Firestore with caching:**
|
|
183
|
+
```yaml
|
|
184
|
+
key: Image_21e85ciy
|
|
185
|
+
type: Image
|
|
186
|
+
props:
|
|
187
|
+
image:
|
|
188
|
+
type: FF_IMAGE_TYPE_NETWORK
|
|
189
|
+
fit: FF_BOX_FIT_COVER
|
|
190
|
+
dimensions:
|
|
191
|
+
width:
|
|
192
|
+
pixelsValue:
|
|
193
|
+
inputValue: 88
|
|
194
|
+
mostRecentInputValue: 88
|
|
195
|
+
height:
|
|
196
|
+
pixelsValue:
|
|
197
|
+
inputValue: 88
|
|
198
|
+
mostRecentInputValue: 88
|
|
199
|
+
borderRadius:
|
|
200
|
+
type: FF_BORDER_RADIUS_ALL
|
|
201
|
+
topLeftValue:
|
|
202
|
+
inputValue: 100
|
|
203
|
+
mostRecentInputValue: 100
|
|
204
|
+
topRightValue:
|
|
205
|
+
inputValue: 100
|
|
206
|
+
mostRecentInputValue: 100
|
|
207
|
+
bottomLeftValue:
|
|
208
|
+
inputValue: 100
|
|
209
|
+
mostRecentInputValue: 100
|
|
210
|
+
bottomRightValue:
|
|
211
|
+
inputValue: 100
|
|
212
|
+
mostRecentInputValue: 100
|
|
213
|
+
allValue:
|
|
214
|
+
inputValue: 100
|
|
215
|
+
mostRecentInputValue: 100
|
|
216
|
+
cached: true
|
|
217
|
+
cacheFadeDuration: 200
|
|
218
|
+
showErrorImage: true
|
|
219
|
+
pathValue:
|
|
220
|
+
variable:
|
|
221
|
+
source: FIRESTORE_REQUEST
|
|
222
|
+
baseVariable:
|
|
223
|
+
firestore: {}
|
|
224
|
+
operations:
|
|
225
|
+
- accessDocumentField:
|
|
226
|
+
fieldIdentifier:
|
|
227
|
+
name: LogoURL
|
|
228
|
+
nodeKeyRef:
|
|
229
|
+
key: ListView_c6q77t1v
|
|
230
|
+
uiBuilderValue:
|
|
231
|
+
serializedValue: https://picsum.photos/seed/733/600
|
|
232
|
+
mostRecentInputValue: https://picsum.photos/seed/733/600
|
|
233
|
+
responsiveVisibility: {}
|
|
234
|
+
opacity:
|
|
235
|
+
opacityValue:
|
|
236
|
+
inputValue: 1
|
|
237
|
+
mostRecentInputValue: 1
|
|
238
|
+
parameterValues: {}
|
|
239
|
+
valueKey: {}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**SVG asset image with responsive visibility:**
|
|
243
|
+
```yaml
|
|
244
|
+
key: Image_6apkcc2e
|
|
245
|
+
type: Image
|
|
246
|
+
props:
|
|
247
|
+
image:
|
|
248
|
+
type: FF_IMAGE_TYPE_ASSET
|
|
249
|
+
fit: FF_BOX_FIT_CONTAIN
|
|
250
|
+
dimensions:
|
|
251
|
+
width:
|
|
252
|
+
pixelsValue:
|
|
253
|
+
inputValue: 120
|
|
254
|
+
borderRadius:
|
|
255
|
+
type: FF_BORDER_RADIUS_ALL
|
|
256
|
+
allValue:
|
|
257
|
+
inputValue: 8
|
|
258
|
+
mostRecentInputValue: 8
|
|
259
|
+
cacheFadeDuration: 500
|
|
260
|
+
pathValue:
|
|
261
|
+
inputValue: projects/dTYvUdos4VEnxHJVe6Wq/assets/rqcvje5bneln/PerkpassLogo.png
|
|
262
|
+
mostRecentInputValue: projects/local-perks-na36z5/assets/qsomrf8ciatl/perkspass_light_red.svg
|
|
263
|
+
padding:
|
|
264
|
+
type: FF_PADDING_ONLY
|
|
265
|
+
responsiveVisibility:
|
|
266
|
+
tabletHidden: true
|
|
267
|
+
tabletLandscapeHidden: true
|
|
268
|
+
desktopHidden: true
|
|
269
|
+
opacity:
|
|
270
|
+
opacityValue:
|
|
271
|
+
inputValue: 1
|
|
272
|
+
mostRecentInputValue: 1
|
|
273
|
+
name: mobile_image
|
|
274
|
+
parameterValues: {}
|
|
275
|
+
valueKey: {}
|
|
276
|
+
```
|