packages.flutter
packages.flutter copied to clipboard
Android due to missing or outdated method onSurfaceDestroyed()
Describe the bug
The plugin fails to compile on Android due to missing or outdated method implementations in Messages.kt. The SurfaceProducer.Callback interface requires onSurfaceDestroyed() to be implemented, but the current version (pdfx-2.9.1) does not include it. Additionally, onSurfaceCleanup() is used but no longer exists in the latest Flutter Android embedding.
To Reproduce
- Steps to reproduce the behavior:
- Add pdfx: ^2.9.1 to pubspec.yaml
- Run flutter pub get
- Launch the app on Android (e.g., flutter run)
Smartphone: Device: Samsung Galaxy S23 Ultra OS: Android 14 Version: Flutter 3.22.0, Dart 3.2.x
Additional context
e: Messages.kt:256:37 Object is not abstract and does not implement abstract member public abstract fun onSurfaceDestroyed(): Unit defined in io.flutter.view.TextureRegistry.SurfaceProducer.Callback
e: Messages.kt:267:13 'onSurfaceCleanup' overrides nothing
@MrKhay, use pdfx: 2.8.0 as a temporary workaround for now.
one can as well upgrade flutter to 3.29+