Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new blog post detailing the migration of the GenLatte backend from Node.js to fullstack Dart. The post covers sharing models, consolidating multiple Cloud Run services into a single Firebase function using DTOs, refactoring client-side writes, and adding end-to-end tests. The review feedback highlights several typographical and grammatical errors in the markdown prose, as well as critical syntax and compilation errors in one of the Dart code examples (specifically, parameter shadowing and a missing semicolon).
| (request, response) { | ||
| final MessageResponse response = switch (request.data) { | ||
| SaveOrderParameters msg => saveOrder(msg), | ||
| CompleteOrderParameters msg => completeOrder(msg), | ||
| ... | ||
| } | ||
| return response.toJson(); | ||
| }, |
There was a problem hiding this comment.
This code snippet contains two Dart syntax/compilation errors:
- The parameter
responseis shadowed by the local variablefinal MessageResponse response, which is a compilation error in Dart. - The switch expression assignment is missing a terminating semicolon.
| (request, response) { | |
| final MessageResponse response = switch (request.data) { | |
| SaveOrderParameters msg => saveOrder(msg), | |
| CompleteOrderParameters msg => completeOrder(msg), | |
| ... | |
| } | |
| return response.toJson(); | |
| }, | |
| (request) { | |
| final MessageResponse response = switch (request.data) { | |
| SaveOrderParameters msg => saveOrder(msg), | |
| CompleteOrderParameters msg => completeOrder(msg), | |
| ... | |
| }; | |
| return response.toJson(); | |
| }, |
References
- Prioritize reporting broken or misleading examples. (link)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Staged preview of the updated docs.flutter.dev site (updated for commit dd78c8d): https://flutter-docs-prod--docs-pr13899-latte-iczre173.web.app |
|
|
||
| ## Fully leaning in to fullstack Dart | ||
|
|
||
| Dart and JavaScript are different languages with different strengths. |
|
Staged preview of the updated flutter.dev site (updated for commit f84df41): https://flutter-dev-230821--www-pr13899-latte-il01vvcv.web.app |
Waiting for image(s)