-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pages & Components Generated Code Docs #252
Conversation
|
The `PageModel` classes are responsible for managing the state of individual pages and initializing the components used in these Pages. These classes extend the `FlutterFlowModel` class, which provides a consistent structure and shared functionality across all page models. | ||
|
||
The following diagram shows how FlutterFlow generates the model and widget class when you create a new Page in FlutterFlow: | ||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the '![page-generation-initial.png]' image, you could stack the two purple boxes and change the color of the boxes on the right side. The arrow below 'FlutterFlow generates files' box is slightly overlapping. Tiny changes but might make it better :)
I quickly updated in the Figma file. If it looks good to you, you can replace it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm switching the colors you added, because the green is consistent for all model methods across diagrams.
|
||
# Generated Code: Components | ||
|
||
Similar to a [**Page**](pages-generated-code.md), when creating a component in FlutterFlow, it automatically generates two files: a `Widget` class and a `Model` class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a hyperlink to the components page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, done!
The diagram below illustrates how these utility classes and methods are utilized in a widget or model class: | ||
|
||
|
||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In '![page-generated.png]' image, I made some alignment fixes in Figma directly. You can check and replace if it looks good to you.
|
||
When a component is added to your page (and every component you create [generates both a widget and a model class)](component-gen-code.md), the flow below explains how the utility classes are used when there is a child component: | ||
|
||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In '![page-component-generated.png]' image, I made some alignment fixes in Figma directly. You can check and replace if it looks good to you.
Description
Provide a brief overview of what this documentation update is about. Explain what sections or topics are being added or revised.
Linear ticket and magic word Fixes DEVR-329
Type of change