Skip to content

Commit 13260f3

Browse files
committed
add info about static vs dynamic content
1 parent 9cfbd43 commit 13260f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/ff-concepts/adding-customization/common-examples.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ Most custom FlutterFlow classes in the generated code are prefixed with `FF<Clas
4141

4242
![suggestions-dropdown.png](imgs/suggestions-dropdown.png)
4343

44-
### Leveraging Component from Custom Widget
44+
### Leveraging Components in Custom Widget
45+
46+
:::warning[Static Components vs Dynamic]
47+
Use this approach only when the component is a fixed element that does not change across different use cases. If the child component needs to change based on user choices, pass it directly [**as a parameter**](custom-widgets.md#creating-a-new-custom-widget).
48+
:::
4549

4650
In a **[Custom Widget](custom-widgets.md)**, you can integrate a previously built **[FlutterFlow Component](../../resources/ui/components/intro-components.md)** directly, saving you from recreating child content in code. For example, if you’re building a Custom Widget to display custom dialog boxes or bottom sheets using a package from
4751
[pub.dev](custom-code.md#pubdev), you can simply return an existing Component created on the canvas, rather than coding a new one from scratch.
@@ -50,6 +54,8 @@ In a **[Custom Widget](custom-widgets.md)**, you can integrate a previously buil
5054
When referencing a Component class in your code, FlutterFlow will automatically add the necessary import statement.
5155
:::
5256

57+
58+
5359
![return-widget-custom-code.png](imgs/return-widget-custom-code.png)
5460

5561

0 commit comments

Comments
 (0)