Skip to content

Adding blog post on A2UI client side functions - #13794

Merged
sfshaza2 merged 4 commits into
mainfrom
a2ui-client-side-functions
Aug 28, 2026
Merged

Adding blog post on A2UI client side functions#13794
sfshaza2 merged 4 commits into
mainfrom
a2ui-client-side-functions

Conversation

@sfshaza2

Copy link
Copy Markdown
Contributor

As it says. Waiting for header image.

@sfshaza2
sfshaza2 requested a review from a team as a code owner August 24, 2026 22:20
@sfshaza2
sfshaza2 marked this pull request as draft August 24, 2026 22:20

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new blog post explaining how to use A2UI's client-side functions to delegate local operations to Dart code on a user's device. The review feedback identifies several syntax and formatting issues within the markdown file, including an invalid Dart enum reference in a code snippet, a missing backtick, a typo in 'executeSync', an empty markdown link, and a broken link syntax at the end of the document.

Comment thread sites/www/content/blog/a2ui-client-side-functions/index.md Outdated
Comment thread sites/www/content/blog/a2ui-client-side-functions/index.md Outdated
Comment thread sites/www/content/blog/a2ui-client-side-functions/index.md Outdated
Comment thread sites/www/content/blog/a2ui-client-side-functions/index.md Outdated
Comment thread sites/www/content/blog/a2ui-client-side-functions/index.md Outdated
@flutter-website-bot

flutter-website-bot commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit 9a06658):

https://flutter-docs-prod--docs-pr13794-a2ui-client-side-funct-0p1n6v0y.web.app

Comment thread sites/www/content/blog/a2ui-client-side-functions/index.md Outdated
@sfshaza2
sfshaza2 marked this pull request as ready for review August 28, 2026 17:27
@sfshaza2
sfshaza2 merged commit 5e56fe2 into main Aug 28, 2026
11 of 13 checks passed
@sfshaza2
sfshaza2 deleted the a2ui-client-side-functions branch August 28, 2026 17:27

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new blog post detailing how to use A2UI's client-side functions in Flutter to run local operations on a user's device. The review feedback points out two key improvements: changing a Mermaid diagram's code block label from dart to mermaid to ensure correct rendering, and updating the validation logic in the Dart code snippet to check for quantity <= 0 instead of quantity < 1 so that fractional quantities are handled correctly.

unnecessary network overhead, achieves consistent formatting,
and lowers overall token usage.

```dart

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The code block contains a Mermaid sequence diagram, but it is labeled as dart. Changing the language identifier to mermaid will enable proper rendering in markdown viewers that support Mermaid diagrams.

Comment on lines +129 to +131
if (quantity == null || quantity < 1) {
return '\$0.00';
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In a kitchen/catering context, ingredients are often measured in fractional quantities (e.g., 0.5 cups, 1.5 lbs). Checking quantity < 1 will incorrectly return $0.00 for any fractional quantity less than 1. Consider checking quantity <= 0 instead.

Suggested change
if (quantity == null || quantity < 1) {
return '\$0.00';
}
if (quantity == null || quantity <= 0) {
return '\$0.00';
}

lamek added a commit that referenced this pull request Aug 28, 2026
Reverts #13794 because the image files are missing.
@sfshaza2
sfshaza2 restored the a2ui-client-side-functions branch August 28, 2026 19:29
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.

3 participants