Skip to content

Feature Request: Add Android Support via WebView Integration #171

@BreckCode

Description

@BreckCode

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

Let me know if you need any clarification or additional information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions