Skip to content

Commit 2f1fcb1

Browse files
committed
Add more info
1 parent c3ab972 commit 2f1fcb1

File tree

1 file changed

+30
-22
lines changed

1 file changed

+30
-22
lines changed

docs/intro/ff-ui/resource-hierarchy.md

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,39 +41,47 @@ If you are coming from Flutter, it is beneficial for you to understand the Flutt
4141
A Resource Description is a brief text note that explains the purpose, usage, or key details of a particular resource. By supplying clear, concise descriptions, you create better project documentation and a smoother development experience—both for yourself and any collaborators.
4242

4343
:::info
44-
Below are some reasons why resource descriptions can significantly enhance your FlutterFlow project:
45-
46-
- **Better Search**: Descriptions are indexed in the FlutterFlow search. This helps locate pages, components, and other resources quickly, especially in large projects.
44+
Here are some reasons why resource descriptions can be helpful:
4745
- **Team Collaboration**: When multiple developers or designers work on the same project, concise descriptions help everyone understand each element’s role without guesswork.
46+
- **Better Search**: Descriptions are indexed in the FlutterFlow search. This helps locate pages, components, and other resources quickly, especially in large projects.
4847
- **Project Documentation**: Acts as built-in documentation of your app, which makes future updates easier.
4948
:::
5049

5150
You can add a description for each of the following resources in FlutterFlow:
5251

53-
- **Project**: Use the project-level description to summarize the overall goals or scope of your app. For instance, “A delivery management app for small businesses” helps keep the team aligned on the primary objective.
54-
- **Page**: Explains a page’s main function. Example: “Displays the user’s shopping cart and checkout options.”
55-
- **Component**: Clarifies the functionality or design intention of a reusable component. Example: “Reusable card component to be used as ListTile.”
56-
- **Action Blocks**: Provide a concise description of what the set of actions does (e.g., “Sends a notification to the user’s email address upon form submission”).
57-
- **Custom Functions**: Describe the logic or purpose behind the function. Example: “Calculates shipping costs based on weight and distance.”
58-
- **Custom Actions**: Specify the custom behavior you’ve created, such as “Opens a QR scanner and returns the scanned value.”
59-
- **Custom Widgets**: Explain the widget’s purpose or structure. Example: “Carousel widget for displaying multiple images with pagination.”
60-
- **Data Type**: Summarizes the purpose of a custom data model. Example: “Represents a user’s order including items, total cost, and status.”
61-
- **Parameters**: Provide context for how a parameter is used, including expected data types or value ranges. Example: “String to store the user’s phone number—must include country code.”
52+
- **Project**: Use the project-level description to summarize the overall goals or scope of your app. For instance, "A delivery management app for small businesses" helps keep the team aligned on the primary objective.
53+
- **Page**: Explains a page’s main function. Example: "Displays the user’s shopping cart and checkout options."
54+
- **Component**: Clarifies the functionality or design intention of a reusable component. Example: "Reusable card component to be used as ListTile."
55+
- **Action Blocks**: Provide a concise description of what the set of actions does (e.g., "Sends a notification to the user’s email address upon form submission").
56+
- **Custom Functions**: Describe the logic or purpose behind the function. Example: "Calculates shipping costs based on weight and distance."
57+
- **Custom Actions**: Specify the custom behavior you’ve created, such as "Opens a QR scanner and returns the scanned value."
58+
- **Custom Widgets**: Explain the widget’s purpose or structure. Example: "Carousel widget for displaying multiple images with pagination."
59+
- **Data Type**: Summarizes the purpose of a custom data model. Example: "Represents a user’s order including items, total cost, and status."
60+
- **Parameters**: Provide context for how a parameter is used, including expected data types or value ranges. Example: "String to store the user’s phone number—must include country code."
61+
- **Page/Component State Variables**: Clarify what state data is being stored and why. For instance, "Tracks the currently selected tab in this component."
62+
- **App State Variables**: Describe the global data shared across pages. Example: “Stores the user’s authentication token for all network requests”.
63+
- **Constant**: Add the intended purpose of any fixed value used throughout the app. Example: "Base API URL for all network calls".
64+
- **Enum**: Provide a rationale for the enumerated values. Example: "Defines possible user roles—admin, editor, viewer".
65+
- **Firestore Collection**: Explain what data the collection holds and how it relates to your app’s functionality. Example: "Stores all user profiles with fields for name, email, and profile photo URL".
66+
67+
In FlutterFlow, you can read descriptions as tooltips when hovering over the green note icon.
6268

6369
:::tip
6470

6571
In the generated code, FlutterFlow inserts descriptions as docstring-like comments near the relevant classes, methods, or properties. For instance, a data type named `OrderInfo` with a description of “Represents a user’s order, including items, total cost, and status” will have that text added above the class declaration:
6672

67-
```jsx
68-
/// Represents a user’s order, including items, total cost, and status.
69-
class OrderInfo {
70-
/// The total price in USD for this order.
71-
double totalAmount;
72-
List<String> items;
73-
// ...
74-
}
75-
```
73+
```jsx
74+
/// Represents a user’s order, including items, total cost, and status.
75+
class OrderInfo {
76+
/// The total price in USD for this order.
77+
double totalAmount;
78+
List<String> items;
79+
// ...
80+
}
81+
```
7682

7783
In a standard IDE (e.g., VS Code or Android Studio), if you place your mouse over a custom data type class name, the description set in FlutterFlow appears as a tooltip, helping you quickly grasp the purpose of a resource.
7884

79-
![resource-description.avif](imgs/resource-description.avif)
85+
![resource-description.avif](imgs/resource-description.avif)
86+
87+
:::

0 commit comments

Comments
 (0)