flutter-native
Installation
SKILL.md
Native Platform Interoperability
Developing Flutter apps often requires direct communication with the underlying native platform (Android/iOS). This skill covers the standards for maintainable and type-safe interoperability.
1. MethodChannels (One-shot)
Use MethodChannel for standard request-response patterns between Dart and Native.
Dart Standard
- Use a unique domain-style channel name.
- ALWAYS wrap calls in a try-catch for
PlatformException.
static const _channel = MethodChannel('com.example.app/device_info');