You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* If the Java/Kotlin code defines a class that `implements` an interface, translate it to a Dart `final class` that `with` (mixes in) the corresponding `\$`-prefixed interface (e.g., `final class MyPrinter with \$Runnable`).
80
-
* The Dart class should override the interface methods as required.
81
-
* Instantiate and pass this class to the `implement` factory: `InterfaceName.implement(MyClassImplementingInterface(...))`
79
+
* If the Java/Kotlin code defines a class that `implements` an interface, To translate it to Dart make this class to be 'final class with' \$InterfaceName, as JNIgen make a mixin class \$InterfaceName that handles this, Don't make it to implements InterfaceName only use the mixin class.
82
80
* **Asynchronous Listener Methods:**
83
81
* For `void`-returning methods in implemented interfaces that should be non-blocking (listeners), explicitly set the `<methodName>\$async` parameter to `true` when using the inline implementation (e.g., `run\$async: true`).
84
82
* If using a reusable class (mixin), override the `<methodName>\$async` getter to return `true` (e.g., `bool get run\$async => true;`).
0 commit comments