[mustache_template] Add example app - #36
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a new example package for mustache_template, including a main.dart file with usage examples and a pubspec.yaml file, and updates the .gitignore to exclude FVM cache. It also updates the README.md to reference these examples using code-excerpt markers. The review feedback highlights discrepancies between the code snippets in README.md and the actual implementations in example/lib/main.dart for exampleUsage, nestedPaths, and lambdasExample, which should be kept in sync.
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
It does not change any package code, so no version bump or CHANGELOG entry is required. It also falls under the test exemption for pure documentation / example changes.
The exemption is for unpublished portions of the example; main.dart is published on pub.dev
Also, this PR does not appear to have had the formatter run on it, as indicated in the checklist, nor does it pass analysis.
| .settings | ||
|
|
||
| # FVM Version Cache | ||
| .fvm/ No newline at end of file |
There was a problem hiding this comment.
Ignores for local tools should be done in your user-level git ignore, not added to the repository.
| path: ../ | ||
|
|
||
| dev_dependencies: | ||
| lints: ^3.0.0 |
There was a problem hiding this comment.
We don't use lints.
| {'firstname': 'Bob', 'lastname': 'Johnson'} | ||
| ]}); | ||
| /// The main entrypoint for the example app. | ||
| void main() { |
There was a problem hiding this comment.
None of this is relevant to the example; just the original code, omitting the main() and print, should be part of the excerpt.
| 'author': <String, String>{'name': 'Greg Lowe'}, | ||
| }); | ||
| print(output); | ||
| } |
There was a problem hiding this comment.
And then more generally, you've significantly changed the structure of all of these examples, making them longer by adding unnecessary boilerplate. The code being excerpted should be structurally the same as it was, with the changes being those necessary to follow style rules.
|
|
||
| ## Example usage | ||
|
|
||
| <?code-excerpt "main.dart (example_usage)"?> |
There was a problem hiding this comment.
This reference is not correct. Did you run the excerpting tool, or did you manually copy everything between the files?
|
ok i will make the changes and update it ASAP!! |
|
Regarding your comment in the issue about this PR, you will need to be running a current version of the repository tooling to correctly implement this. Targeting a version of the tooling that is more than three years old won't result in a PR that passes CI. |
Adds an example application for the
mustache_templatepackage and updates the README to be more high-level.Previously the package had no example app (causing a pub.dev score deduction), and most of the documentation lived in the README. This PR moves the detailed examples into a proper
example/directory and cleans up the README.Fixes flutter/flutter#183936
Pre-Review Checklist
[vector_math]///).This PR only adds an example app and improves documentation. It does not change any package code, so no version bump or CHANGELOG entry is required. It also falls under the test exemption for pure documentation / example changes.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2