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

Update "Web embedding" documentation. #10977

Merged
merged 7 commits into from
Aug 1, 2024
Merged

Conversation

ditman
Copy link
Member

@ditman ditman commented Jul 30, 2024

This PR:

  • Adds an "Embedding Flutter on the Web" documentation page describing the different ways that Flutter content can be added to a host website: full-screen, embedded mode/multiView, custom element (single-view embedded mode).
  • Adds a "Embedding web content into a Flutter web app" documentation page describing how to add Web content into a Flutter web app as a Widget.

(Both of the pages are added under the "Platform integration > Web" section.)

The PR also:

  • De-duplicates redundant embedding content from different pages, by linking directly to the new documents (Web FAQ, Web deployment)
  • Adds an "Add to a web app" link under the "Add to an existing app" menu section, pointing to the Embedding on the web, so people looking at Add To App finds the Web docs more easily.

Issues

Fixes: #10773

Presubmit checklist

  • This PR is marked as draft with an explanation if not meant to land until a future stable release.
  • This PR doesn’t contain automatically generated corrections (Grammarly or similar).
  • This PR follows the Google Developer Documentation Style Guidelines — for example, it doesn’t use i.e. or e.g., and it avoids I and we (first person).
  • This PR uses semantic line breaks of 80 characters or fewer.

@ditman
Copy link
Member Author

ditman commented Jul 30, 2024

/cc @johnpryan @kevmoo @yjbanov FYI!

@ditman ditman mentioned this pull request Jul 30, 2024
1 task
@flutter-website-bot
Copy link
Collaborator

flutter-website-bot commented Jul 30, 2024

Visit the preview URL for this PR (updated for commit bb0e06f):

https://flutter-docs-prod--pr10977-web-embedding-docs-o3h28ltv.web.app


/// Calls [viewBuilder] for every view added to the app to obtain the widget to
/// render into that view. The current view can be looked up with [View.of].
class MultiViewApp extends StatefulWidget {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems SUPER complex. It feels like there should be a widget we ship here to do most of this heavy lifting.

Copy link
Member Author

@ditman ditman Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MultiViewApp is (one of the) widgets you're describing; this is how it's used:

(The viewBuilder function can (must?) have additional complexity to decide what widgets go into each viewId)

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks SO MUCH, @ditman, for this PR! I've done some changes, mostly to make the language less passive. Once you process my feedback, lgtm.

Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're getting there!

Apply some more of Shams' suggestions

Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
@sfshaza2
Copy link
Contributor

sfshaza2 commented Aug 1, 2024

Land when ready, @ditman!

@ditman
Copy link
Member Author

ditman commented Aug 1, 2024

Talked to @kevmoo, we're clicking the button!

@ditman ditman merged commit da7eb92 into flutter:main Aug 1, 2024
9 checks passed
@ditman ditman deleted the web-embedding-docs branch August 1, 2024 23:11
@ditman
Copy link
Member Author

ditman commented Aug 2, 2024

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.

[flutter web] document multi-view
5 participants