بنقرة واحدة
dev-dart-patterns
Common Dart specific development patterns. Triggers: flutter, dart
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Common Dart specific development patterns. Triggers: flutter, dart
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Implement the next highest priority user story from the PRD. Triggers on: implement the next feature, dev next feature.
Analyze product screenshots to extract feature lists and generate development task checklists. Use when: (1) Analyzing competitor product screenshots for feature extraction, (2) Generating PRD/task lists from UI designs, (3) Batch analyzing multiple app screens, (4) Conducting competitive analysis from visual references.
A CLI tool to manage Product Requirements Documents (PRDs) with features, user stories, and acceptance criteria. Triggers on: prd, product requirements, feature management, feature, user story.
Initialize Flutter projects for AI assisted workflow. Triggers on: init flutter.
Common Flutter specific development patterns. Triggers: flutter, mobile, app, riverpod
| name | dev-dart-patterns |
| description | Common Dart specific development patterns. Triggers: flutter, dart |
This skill provides common development patterns to be used when developping programs using the Dart programming language.
class Example {
const Example({
required this.name,
});
final String name;
void greet() {
print('Hello, $name!');
}
}
/// Define a sealed class with subclasses
sealed class Result<T> {
const Result();
const factory Result.success(T data) = Success<T>;
const factory Result.error(int code) = Error<T>;
}
class Success<T> extends Result<T> {
final T data;
const Success(this.data);
}
class Error<T> extends Result<T> {
final int code;
const Error(this.code);
}
async functions with await and try/catch blocks over chaining then callsFuture<String> fetchData() async {
try {
final response = await http.get(Uri.parse('https://api.example.com/data'));
if (response.statusCode == 200) {
return response.body;
} else {
throw FetchException('Failed to load data, statuc code: ${response.statusCode}', inner: e);
}
} catch (e) {
throw FetchException('Error fetching data', inner: e);
}
}
switch statements and expressions when possible/// Pattern matching expressions with `switch`
@override
Widget build(BuildContext context) {
return switch(result) {
Success(:final data) => Container(color: Colors.green, child: Text('Success with data: $data')),
Error(:final code) => Text('Error with code: $code'),
};
}
/// Pattern matching statements with `switch`
switch(result) {
case Success(:final data):
print('Success with data: $data');
case Error(:final code)
print('Error with code: $code');
}