Skip to content

Android due to missing or outdated method onSurfaceDestroyed() #588

@MrKhay

Description

@MrKhay

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions