coding-dart
coding-dart
Purpose
This skill provides expertise in Dart 3 programming, focusing on features like null safety, async/await, streams, isolates, Flutter integration, and pub package management, to assist in writing efficient, safe code for apps and tools.
When to Use
Use this skill for Dart 3 projects involving mobile apps (e.g., Flutter), concurrent processing, asynchronous operations, or package dependencies. Apply it when null safety is critical to avoid runtime errors, or for handling real-time data with streams.
Key Capabilities
- Null Safety: Enforce non-nullable types using
latefor lazy initialization andrequiredfor parameters, e.g.,late String name;to declare a variable that must be initialized before use. - Async/Await: Handle asynchronous code with
Futureandasyncfunctions, such asFuture<void> fetchData() async { var data = await http.get('/api/data'); }. - Streams: Manage asynchronous data streams using
Streamfromdart:async, e.g.,Stream<int> countStream() async* { for (int i = 0; i < 5; i++) yield i; }. - Isolates: Run concurrent tasks with
Isolatefor CPU-bound operations, e.g.,Isolate.spawn(workerFunction, args);to offload work. - Flutter Integration: Build UI with widgets and state management, e.g., using
StatelessWidgetfor simple components. - Pub Package Manager: Manage dependencies via pub, including adding packages with
pub add package_name.
Usage Patterns
To accomplish tasks, structure code with null safety by always specifying types (e.g., String? optionalString; for nullable values). For async operations, wrap I/O in async functions and use await for readability. Use isolates for background tasks to avoid UI blocking. Integrate Flutter by starting with MaterialApp in main.dart. For package management, run pub get after editing pubspec.yaml. Always test with dart test before deployment.
More from alphaonedev/openclaw-graph
playwright-scraper
Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots
1.4Kgcp-iam
Manages identity and access control for Google Cloud resources using IAM policies and roles.
370humanize-ai-text
AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment
260macos-automation
AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API
173tavily-web-search
Tavily: web search optimized for AI agents, answer synthesis, domain filtering, depth control
155clawflows
OpenClaw workflow automation: multi-step task chains, conditional logic, triggers, schedule
102