Skip to content
Agentmart
Submit a tool

dart-logic-patterns

Use when organizing business logic, implementing algorithmic workflows, or applying Dart data structures and pattern matching.

Skill by dhruvanbhalara

IndexedMIT★ 30
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/dhruvanbhalara-dart-logic-patterns

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when organizing business logic, implementing algorithmic workflows, or applying Dart data structures and pattern matching.

Use cases: data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/dart-logic-patterns

What's inside

Skill name
dart-logic-patterns
Description
Use when organizing business logic, implementing algorithmic workflows, or applying Dart data structures and pattern matching.
License
MIT
Metadata
category: logic · languages: dart · platforms: dart
Instructions
28 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Algorithms & Logic

The efficiency of your business logic directly impacts battery life and responsiveness.

## Complexity Analysis
- **Big O Awareness**: Understand the cost of your operations. Avoid O(n²) or higher on the main thread for datasets larger than a few hundred items.
- **Data Structure Selection**:
  - `Map`: Fast key-based lookups.
  - `Set`: Fast unique item management.
  - `List`: Fast indexing and sequential access.
  - `LinkedHashSet/Map`: Preserves insertion order while providing fast lookups.

## Logic Patterns
- **Debouncing**: Delay execution until a user stops interacting (e.g., search-as-you-type).
- **Throttling**: Limit execution to at most once every interval (e.g., scrolling events).
- **Memoization**: Cache the results of expensive pure functions based on their arguments. Use `package:memoize` or custom implementations.
- **Pattern Matching (Dart 3+)**: Use switch expressions and exhaustive pattern matching for control flow instead of deeply nested if-else chains. This is a core part of clean Dart logic.

## Search & Sort
- **Binary Search**: Use for sorted lists to transform O(n) searches into O(log n).
- **Efficient Sorting**: Use Dart's built-in `list.sort()`, which uses highly optimized algorithms. Provide targeted `Comparable` implementations for custom objects.

## Business Logic Organization
- **Pure Functions**: Keep business logic in pure, testable functions outside of UI classes.
- **Fail Fast**: Use guard clauses to handle edge cases and invalid states early.
- **Validation Logic**: Keep complex validation in a separate domain layer, reusable across different screens.

From dhruvanbhalara/skills, MIT.

More from dhruvanbhalara/skills

Signals

Stars
30
Forks
4
Open issues
0
Last commit (this folder)
Aug 29, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from dhruvanbhalara

Cite this page

dart-logic-patterns skill. Agent Mart. https://agentmart.dev/skills/dhruvanbhalara-dart-logic-patterns (last updated 2026-10-24)