Skip to content

[Proposal] Migrate Android plugin implementation to modern FlutterPlugin API #592

Open
@MAM606

Description

@MAM606

Summary

Currently, the flutter_tts Android implementation still relies on the old PluginRegistry.Registrar API, which has been deprecated for quite some time by the Flutter team. This approach is triggering warnings during build and may pose future compatibility issues with upcoming Flutter SDK versions.

As a Flutter developer with 5+ years of experience building production-grade apps on both Android and iOS, I propose migrating the plugin implementation to the modern FlutterPlugin and ActivityAware APIs.


Why this matters

  • The use of deprecated APIs leads to compilation warnings and potentially unstable behavior on newer Android versions.
  • New Flutter projects no longer generate plugins using Registrar, which may cause confusion for developers.
  • Migrating ensures future-proofing the plugin and aligns it with Flutter's best practices for plugin development.

My proposal

I'd like to contribute a pull request that:

  • Migrates the FlutterTtsPlugin.kt class to use FlutterPlugin with onAttachedToEngine() and ActivityAware where needed.
  • Ensures backward compatibility with current usage.
  • Verifies functionality across various Android API levels.
  • Leaves the iOS implementation untouched (as this change is Android-specific).

Questions before I proceed

  • Are you open to a pull request with these changes?
  • Is there any ongoing work related to this migration that I should be aware of?
  • Are there any specific test cases or examples you'd like me to validate against?

If this is approved, I’ll begin work and submit a well-documented PR for review.

Thanks for the great work on this plugin — looking forward to contributing!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions