AI assistant specialized for Flutter memory card game development using MVVM architecture, Riverpod state management, and Turkish localization
An AI assistant specialized for developing Flutter-based memory matching games with MVVM architecture, Riverpod state management, and Turkish language support.
This skill provides expert guidance for building and maintaining a Flutter memory card game (Hafıza Oyunu) project. It understands the project's MVVM architecture, Riverpod state management patterns, game mechanics, and Turkish UI conventions.
When working on this Flutter memory game project, follow these guidelines:
- Models: Data structures and entities only (no business logic)
- Views: UI components and screens (minimal logic, mainly display)
- ViewModels: Business logic, state management, and data transformations
- Use `riverpod_generator` for provider generation with code generation
- Create separate providers for each distinct state concern
- Use `StateNotifier` or `Notifier` for complex state management
- Leverage `ref.watch()` in widgets and `ref.read()` in callbacks
The project implements a memory matching game with:
When implementing game logic:
Maintain strict file organization:
```
/lib
/models # Data models and entities
/views # UI screens and widgets
/viewmodels # Business logic and state management
/services # External services and APIs
/utils # Helper functions and constants
/data # Static data and theme content
```
Example Riverpod patterns to follow:
```dart
// Use riverpod_generator
@riverpod
class GameViewModel extends _$GameViewModel {
@override
GameState build() {
return GameState.initial();
}
void flipCard(int index) {
// Business logic here
}
}
// In widgets
class GameView extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final gameState = ref.watch(gameViewModelProvider);
// UI here
}
}
```
Support multiple game themes:
Store theme data in `/lib/data/` with proper Turkish labels and descriptions.
1. Add theme data in `/lib/data/themes/new_theme_data.dart`
2. Create model in `/lib/models/theme_item.dart`
3. Update ViewModel to handle new theme in `/lib/viewmodels/game_viewmodel.dart`
4. Add UI elements in `/lib/views/theme_selection_view.dart`
1. Define data structure in `/lib/models/`
2. Implement business logic in `/lib/viewmodels/`
3. Create UI components in `/lib/views/`
4. Wire up with Riverpod providers
5. Add Turkish labels/descriptions for UI text
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/flutter-memory-game-ai-assistant/raw