g123k / flutter_torch_compat

A plugin to enable or disable the torch of a device that works both on Android (including Android 4.x) and iOS.
https://pub.dev/packages/torch_compat
Apache License 2.0
7 stars 22 forks source link

Object is not abstract and does not implement abstract base class member public abstract fun onActivityStopped #15

Open kamleshwebtech opened 3 years ago

kamleshwebtech commented 3 years ago

Launching lib\main.dart on Redmi Note 4 in debug mode... lib\main.dart:1 e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\TorchCompatPlugin.kt: (28, 65): Object is not abstract and does not implement abstract base class member public abstract fun onActivityStopped(@NonNull p0: Activity): Unit defined in fr.g123k.torch_compat.utils.ActivityLifecycleCallbacks e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\utils\ActivityLifecycleCallbacks.kt: (7, 6): Class 'ActivityLifecycleCallbacks' is not abstract and does not implement abstract member public abstract fun onActivityPaused(@NonNull p0: Activity): Unit defined in android.app.Application.ActivityLifecycleCallbacks e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\utils\ActivityLifecycleCallbacks.kt: (8, 5): 'onActivityPaused' overrides nothing e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\utils\ActivityLifecycleCallbacks.kt: (11, 5): 'onActivityResumed' overrides nothing e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\utils\ActivityLifecycleCallbacks.kt: (14, 5): 'onActivityStarted' overrides nothing e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\utils\ActivityLifecycleCallbacks.kt: (17, 5): 'onActivityDestroyed' overrides nothing

e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\utils\ActivityLifecycleCallbacks.kt: (20, 5): 'onActivitySaveInstanceState' overrides nothing e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\utils\ActivityLifecycleCallbacks.kt: (23, 5): 'onActivityStopped' overrides nothing e: D:\john\flutter.pub-cache\hosted\pub.dartlang.org\torch_compat-1.0.2\android\src\main\kotlin\fr\g123k\torch_compat\utils\ActivityLifecycleCallbacks.kt: (26, 5): 'onActivityCreated' overrides nothing

Please suggest what is the problem and solution? Thanks.

daxosorg commented 3 years ago

same issue i am also getting

cortrano commented 3 years ago

Here is my fix for this Error: https://github.com/g123k/flutter_torch_compat/pull/19