Skip to content

Commit c3ab972

Browse files
committed
Resource Description
1 parent 466d772 commit c3ab972

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed
Binary file not shown.

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

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ title: Resource Hierarchy Overview
44
description: Explore the Resource Hierarchy Overview to understand the correlation between traditional Flutter app components and their equivalents in FlutterFlow.
55
tags: [Resource Hierarchy, FlutterFlow, Project Management]
66
sidebar_position: 5
7-
keywords: [Resource Hierarchy, FlutterFlow, Project Management]
7+
keywords: [Resource Hierarchy, FlutterFlow, Project Management, Resource Description]
88
---
99

1010

11-
# Resource hierarchy overview
11+
# Resource Hierarchy Overview
1212

1313
This guide aims to help you understand the structure and elements of a typical FlutterFlow project. It will walk you through some important parts of the app, from the overall project down to individual design elements, explaining their purpose and how they relate to traditional Flutter app components.
1414

@@ -34,4 +34,46 @@ If you are coming from Flutter, it is beneficial for you to understand the Flutt
3434
2. **MyPage to Page**: `MyPage` in Flutter represents a specific screen in the app. Similarly, In FlutterFlow, each "Page" corresponds to a screen, where you build the layout and functionality specific to that page of the project. Learn more about pages in FlutterFlow [here](../../resources/ui/pages/intro-pages.md#creating-a-page).
3535
3. **Column, Button, Text to Built-in widgets**: In FlutterFlow, widgets are categorized under "Built-in widgets," which users can drag and drop onto their canvas to build the UI. Learn more about widgets [here](../../resources/ui/overview.md#widgets).
3636
4. **Custom widget to Component**: `CustomWidget` in Flutter indicates user-defined widgets that serve specific functions not covered by built-in widgets. FlutterFlow translates this into "Component" allowing you to create and use custom components within your projects. Learn more about creating a component [here](../../resources/ui/components/intro-components.md).
37-
5. **Theme/style constants to Design System**: In Flutter, theme and style constants are used to ensure consistent styling across an app. FlutterFlow uses a "Design System" to manage and apply uniform styles and themes throughout the application. Learn more about design system [here](../../ff-concepts/design-system/design-system.md).
37+
5. **Theme/style constants to Design System**: In Flutter, theme and style constants are used to ensure consistent styling across an app. FlutterFlow uses a "Design System" to manage and apply uniform styles and themes throughout the application. Learn more about design system [here](../../ff-concepts/design-system/design-system.md).
38+
39+
## Resource Description
40+
41+
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.
42+
43+
:::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.
47+
- **Team Collaboration**: When multiple developers or designers work on the same project, concise descriptions help everyone understand each element’s role without guesswork.
48+
- **Project Documentation**: Acts as built-in documentation of your app, which makes future updates easier.
49+
:::
50+
51+
You can add a description for each of the following resources in FlutterFlow:
52+
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.”
62+
63+
:::tip
64+
65+
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:
66+
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+
```
76+
77+
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.
78+
79+
![resource-description.avif](imgs/resource-description.avif)

0 commit comments

Comments
 (0)