mobiai-flutter
/mobiai-flutter
Use when working on a Flutter or Dart project — building, testing, debugging, understanding state management and project structure.
- Author
- arisguimera ↗
- Repository
- mobiai-core ↗
- Licence
- MIT
- Last repository change
- 21.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when working on a Flutter or Dart project — building, testing, debugging, understanding state management and project structure.
Original author description
Use when working on a Flutter or Dart project — building, testing, debugging, understanding state management and project structure.
How it works
- When to Use
- Detecting a Flutter Project
- Project Structure
- Build Commands
- State Management Detection
- Testing
- Common Issues
- Tracing Bugs
SKILL.md preview
---
name: mobiai-flutter
description: Use when working on a Flutter or Dart project — building, testing, debugging, understanding state management and project structure.
license: MIT
compatibility: [claude-code, cursor, copilot, codex]
platforms: [flutter]
---
# Flutter / Dart
> **Community contribution welcome!** Help flesh out this skill with Flutter patterns, state management approaches, and real-world workflows.
Guide for working with Flutter projects.
## When to Use
- Working on a Flutter/Dart project
- Debugging widget issues, state management problems, or platform channel errors
- Writing tests for Flutter code
## Detecting a Flutter Project
```bash
# Check for Flutter indicators
ls pubspec.yaml lib/ test/ 2>/dev/null
cat pubspec.yaml | head -20
flutter --version
```
## Project Structure
```
project/
lib/
main.dart # Entry point
app.dart # App widget
features/
home/
home_screen.dart # Screen widget
home_bloc.dart # State management (BLoC example)
home_state.dart
home_event.dart
widgets/ # Feature-specific widgets
core/
models/ # Data models
services/ # API, database
utils/ # Helpers
test/
features/
home/
home_bloc_test.dart
widget_test.dart
pubspec.yaml # Dependencies
analysis_options.yaml # Lint rules
```
## Build Commands
```bash
# Run in debug mode
flutter run
# Build debug APK
flutter build apk --debug
# Build release APK
flutter build apk --release
# Build iOS
flutter build ios --release
# Run analysis (lint)
flutter analyze
# Format code
dart format lib/
```
## State Management Detection
```bash
# BLoC
grep -r "flutter_bloc\|BlocProvider\|BlocBuilder" lib/ --include="*.dart" | head -5
# Riverpod
grep -r "flutter_riverpod\|ProviderScope\|ConsumerWidget" lib/ --include="*.dart" | head -5
# Provider
grep -r "^import.*provider" lib/ --include="*.dart" | head -5
# GetX
grep -r "get:\|GetMaterialApp\|GetxController" lib/ --include="*.dart" | head -5
# MobX
grep -r "flutter_mobx\|Observable\|@action" lib/ --include="*.dart" | head -5
```
## Testing
### Unit Tests
```dart
// test/features/home/home_bloc_test.dart
import 'package:test/test.dart';
void main() {
group('HomeBloc', () {
late HomeBloc bloc;
setUp(() {
bloc = HomeBloc(repository: MockRepository());
});
test('initial state is HomeInitial', () {
expect(bloc.state, isA<HomeInitial>());
});
test('emits [Loading, Loaded] when data fetch succeeds', () {
expectLater(
bloc.stream,
emitsInOrder([isA<HomeLoading>(), isA<HomeLoaded>()]),
);
bloc.add(LoadHomeData());
});
});
}
```
### Widget Tests
```dart
testWidgets('displays loading indicator', (tester) async {
await tester.pumpWidget(
MaterialApp(home: HomeScreen()),
);
expect(find.byType(CircularProgressIndicator), findsOneWidget);
});
```
### Run Tests
```bash
# All tests
flutter test
# Specific file
flutter test test/features/home/home_bloc_test.dart
# With coverage
flutter test --coverage
```
## Common Issues
- **Widget rebuild performance**: Check for unnecessary rebuilds with `const` constructors
- **State management leaks**: Ensure BLoC/controllers are properly disposed
- **Platform channel errors**: Check both Dart and native (Android/iOS) code
- **Hot reload doesn't work**: Try hot restart (`R` in terminal) or full restart
## Tracing Bugs
1. **Check the error in the console** — Flutter errors are usually descriptive
2. **Widget tree issues**: Use Flutter Inspector or `debugDumpApp()`
3. **State management**: Add logging to state transitions
4. **Platform channel**: Check both sides (Dart + native)
---
**Want to improve this skill?** Share your Flutter expertise, architecture patterns, and debugging techniques via a PR.
Versions
The database has no other skills named mobiai-flutter.
Database snapshot: 13.11.2026 · package version 8829659c45cc (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100mobiai-react-native
Use when working on a React Native project — building, testing, debugging, understanding navigation and state management. - 100flutter-expert
Expert in Flutter SDK, Dart, widgets, state management, and cross-platform mobile development. Use when the user mentions mobile, Dart, cross platform, UI, or state management, or when the task involves Flutter Architecture, Widget Fundamentals, State Management Approaches, or Lifecycle Methods. - 100dart-n-flutter
Instructions for writing Dart and Flutter code following the official recommendations. Triggers on: **/*.dart - 85flutter
Use when writing or reviewing Flutter or Dart code — widget structure, state management, rendering performance on Impeller, or adapting a screen to iOS and Android. - 90flutter-best-practices
Use when writing, reviewing, refactoring, or planning Flutter/Dart code — screens, features, project structure, state management, folders, widgets, cubits/blocs, repositories, services, or tests. - 86flutter
Dart + Flutter开发专家助手。当用户需要进行Flutter应用开发、组件开发、状态管理、导航或跨平台移动/桌面应用构建时调用。