← スキル一覧に戻る

deprecated-api-detection
by AVRA-CADAVRA
⭐ 0🍴 0📅 2026年1月24日
SKILL.md
name: deprecated-api-detection description: Detects and flags deprecated Flutter/Dart APIs, suggests modern equivalents. Use when reviewing code, refactoring, or ensuring code uses modern APIs.
Deprecated API Detection
Mandatory Rule
✅ Zero deprecated API warnings - always use modern Flutter/Dart APIs ✅ Check Flutter/Dart migration guides for modern equivalents
Common Deprecations
Flutter Widgets
❌ Deprecated:
RaisedButton(
onPressed: () {},
child: Text('Click'),
)
✅ Modern:
ElevatedButton(
onPressed: () {},
child: Text('Click'),
)
Flutter Testing
❌ Deprecated:
tester.binding.window.physicalSize = Size(800, 600);
✅ Modern:
tester.view.physicalSize = Size(800, 600);
Flutter Text Theme
❌ Deprecated:
Theme.of(context).textTheme.headline
✅ Modern:
Theme.of(context).textTheme.headlineMedium
Detection Methods
IDE Warnings
Most IDEs highlight deprecated APIs automatically:
- Yellow squiggly lines
- Deprecation warnings in Problems panel
- Hover tooltips showing deprecation info
Static Analysis
Run static analysis to detect deprecations:
flutter analyze
dart analyze
Migration Guides
Check Flutter/Dart migration guides for common deprecations:
- Flutter Migration Guide
- Dart Migration Guide
- Breaking Changes documentation
Modern API Patterns
Material 3
Use Material 3 widgets when available:
// ✅ Modern Material 3
Card(
elevation: 0, // Use shadowColor instead
shape: RoundedRectangleBorder(...),
)
Null Safety
Use null-safe APIs:
// ✅ Modern null-safe
String? getValue() => _value;
final result = getValue() ?? 'default';
Async/Await
Use async/await instead of deprecated patterns:
// ✅ Modern async/await
Future<String> fetchData() async {
return await repository.getData();
}
Refactoring Pattern
When encountering deprecated API:
- Identify deprecation - Read deprecation message
- Find modern equivalent - Check migration guide
- Update code - Replace with modern API
- Test changes - Verify behavior unchanged
- Remove old code - Clean up deprecated usage
Common Deprecations Checklist
- No
RaisedButton(useElevatedButton) - No
FlatButton(useTextButton) - No
OutlineButton(useOutlinedButton) - No
tester.binding.window(usetester.view) - No deprecated text theme names (use
headlineMediumnotheadline) - No deprecated HTTP methods
- No deprecated image loading APIs
- No deprecated route APIs
Tools
- Flutter analyze - Detects deprecations
- IDE warnings - Highlights deprecated APIs
- Migration guides - Provides modern equivalents
Reference
- Flutter Migration Guide
- Dart Migration Guide
- Breaking Changes documentation
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です