Skip to content

馃 chore: sync skills directory from dart-lang/skills - #248

Merged
keertip merged 1 commit into
mainfrom
automation/sync-dart-skills
Oct 19, 2026
Merged

keertip merged 1 commit into
mainfrom
automation/sync-dart-skills

Conversation

@flutter-skills-sync-bot

Copy link
Copy Markdown
Collaborator

Automated changes by create-pull-request GitHub action

@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 updates the plugin version to 1.0.7 across configuration files and refines the Dart pattern matching skill guide (SKILL.md) with detailed guidelines on when to use object destructuring versus standard property access. The review feedback suggests clarifying a bullet point in the guide to explicitly distinguish between reading a single property and avoiding deeply nested object patterns.

Use standard property access (`user.name`) rather than object pattern destructuring (`final User(:name) = user;`) when reading a single property on a known non-null instance.
### 5. Use Object Destructuring for Multi-Field Unpacking, Not Single Properties or Passthroughs
Use object or record destructuring when extracting 3+ fields used across multiple statements, iterating `MapEntry(:key, :value)` in `map.entries` loops, eliminating a single-use intermediate variable, or promoting nullable fields to local variables (`:field!` or `:field` with `!= null`). Keep standard property/element access (`config.field`) when:
* Reading a single property (`user.name`, or `final CpuCallFrame(:url, :line) = node.callFrame;` rather than nesting `ProfileNode(callFrame: ...)`).

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 bullet point description mentions "Reading a single property", but the second example (final CpuCallFrame(:url, :line) = node.callFrame;) actually extracts two properties and is intended to demonstrate avoiding nested object patterns (i.e., avoiding nesting ProfileNode(callFrame: ...)).\n\nTo prevent confusion, it would be clearer to explicitly separate these two distinct cases (reading a single property vs. avoiding nested object patterns).

Suggested change
* Reading a single property (`user.name`, or `final CpuCallFrame(:url, :line) = node.callFrame;` rather than nesting `ProfileNode(callFrame: ...)`).
* Reading a single property (e.g., `user.name`), or avoiding deeply nested object patterns (e.g., using `final CpuCallFrame(:url, :line) = node.callFrame;` rather than nesting `ProfileNode(callFrame: ...)`).

@keertip
keertip merged commit 6e59065 into main Oct 19, 2026
14 checks passed
@keertip
keertip deleted the automation/sync-dart-skills branch October 19, 2026 18:13
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