google / google/codemirror.dart
Feature Request: Add Android Support via WebView Integration
- Dominant language
- Dart
- Stars
- 89
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
## Overview
Currently, codemirror.dart only supports web platforms. However, there's a growing need for advanced code editing capabilities in Flutter applications, particularly on Android platforms. While the package works great for web, it would be extremely valuable to have Android support through WebView integration.
## Current Limitations
1. Package is web-only, limiting its use in cross-platform Flutter applications
2. No direct support for Android/iOS platforms
3. Lack of advanced code editing capabilities in Flutter mobile apps
## Proposed Solution
Consider adding support for Android platforms through WebView integration. This would allow:
1. Using codemirror.dart in Android applications via WebView
2. Maintaining the rich features of CodeMirror while supporting mobile platforms
3. Providing a consistent code editing experience across web and mobile
## Technical Considerations
Some key points to consider for implementation:
1. WebView integration patterns and best practices
2. Handling mobile-specific interactions (keyboard, touch events)
3. Performance optimization for mobile devices
4. Communication bridge between Flutter and WebView
## Alternative Solutions Currently Available
1. Using simpler text editing widgets (lacking advanced features)
2. Custom implementations of code editors (time-consuming and complex)
3. Other packages like flutter_monaco, but they also face similar platform limitations
## Impact
Adding Android support would:
1. Expand the package's usability to mobile applications
2. Provide Flutter developers with a robust code editing solution
3. Maintain consistency with web implementations
4. Fill a significant gap in the Flutter ecosystem for mobile code editing
## Questions
1. Is this something the team would consider implementing?
2. Are there technical limitations preventing Android support?
3. Would the team be open to community contributions for this feature?
## References
- [CodeMirror Mobile Issues](https://github.com/codemirror/codemirror5/issues/3654)
- [Flutter WebView Documentation](https://docs.flutter.dev/platform-integration/web/renderers)
Let me know if you need any clarification or additional information.
Contributor guide
Assessment
This issue has not been assessed yet.