Skip to content
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

Merged
merged 13 commits into from
Jan 23, 2025
Merged

Conversation

PoojaB26
Copy link
Collaborator

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

  • Typo fix
  • New feature
  • Enhancement to current docs
  • Removed outdated references
  • Update assets

Copy link

stackblitz bot commented Jan 13, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions bot requested a review from pinkeshmars January 13, 2025 14:59
@PoojaB26 PoojaB26 mentioned this pull request Jan 16, 2025
5 tasks
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:
![page-generation-initial.png](imgs/page-generation-initial.png)
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.
Copy link
Collaborator

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?

Copy link
Collaborator Author

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:


![page-generated.png](imgs/page-generated.png)
Copy link
Collaborator

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:

![page-component-generated.png](imgs/page-component-generated.png)
Copy link
Collaborator

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.

@PoojaB26 PoojaB26 merged commit 3111a84 into main Jan 23, 2025
1 check passed
@PoojaB26 PoojaB26 deleted the pooja/gen-code-pages-comp branch January 23, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants