diff --git a/docs/ff-concepts/adding-customization/code-file.md b/docs/ff-concepts/adding-customization/code-file.md index 182f2f46..012c45dc 100644 --- a/docs/ff-concepts/adding-customization/code-file.md +++ b/docs/ff-concepts/adding-customization/code-file.md @@ -139,7 +139,8 @@ You need to create an instance of a class so you can work with actual data and u ); ``` -- You can reuse the same class structure multiple times with different review data. +- In FlutterFlow, you will store the instance of the custom class in the [state variables](../../ff-concepts/state-management/state-variables.md#state-variables) of your app, page, or component. +- You can create multiple instances of the same class, reusing the same structure multiple times, each with different review data. When you create an instance of a class, you can: @@ -147,7 +148,7 @@ When you create an instance of a class, you can: - Access and update the fields (e.g., `review1.rating` or `review1.comment`). - Call methods that do something with that data (e.g., `review1.markHelpful()` or `review1.shortComment()`). -To create an instance of a custom class, open the **Set from Variable** dialog and select **Create Custom Class Instance**. Choose the class you want to use, then select the class name from the **Constructor** dropdown. After that, set values for each of the required fields. +To create an instance of a custom class, first you need to [create a state variable](../../ff-concepts/state-management/state-variables.md#creating-state-variables) (of type Custom Class) that will hold the instance. Then, to create and add the instance to the state variable, open the **Set from Variable** dialog and select **Create Custom Class Instance**. Choose the class you want to use, then select the class name from the **Constructor** dropdown. After that, set values for each of the required fields.