diff --git a/pkgs/jnigen/docs/interface_implementation.md b/pkgs/jnigen/docs/interface_implementation.md index f96c10642..566824e78 100644 --- a/pkgs/jnigen/docs/interface_implementation.md +++ b/pkgs/jnigen/docs/interface_implementation.md @@ -36,7 +36,7 @@ class Runnable extends JObject { ) { /* ... */ } } -abstract mixin class $Runnable { +abstract base mixin class $Runnable { factory $Runnable({ required void Function() run, bool run$async, @@ -87,7 +87,7 @@ implementing the interface in Java instead of using the lambdas: ```java // Java -public class Printer with Runnable { +public class Printer implements Runnable { private final String text; public Printer(String text) { @@ -108,7 +108,7 @@ You can do the same in Dart by creating a subclass that implements `$Runnable`: ```dart // Dart -class Printer with $Runnable { +final class Printer with $Runnable { final String text; Printer(this.text); @@ -145,7 +145,7 @@ Similarly, when subclassing ```dart // Dart -class Printer with $Runnable { +final class Printer with $Runnable { final String text; Printer(this.text); diff --git a/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart b/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart index 41e9e22d0..fdabd98d5 100644 --- a/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart +++ b/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart @@ -993,7 +993,7 @@ void registerTests(String groupName, TestRunnerCallback test) { }); } -class DartStringToIntParser implements $StringConverter { +final class DartStringToIntParser with $StringConverter { final int radix; DartStringToIntParser({required this.radix}); @@ -1004,7 +1004,7 @@ class DartStringToIntParser implements $StringConverter { } } -class AsyncRunnable with $MyRunnable { +final class AsyncRunnable with $MyRunnable { final Completer completer; AsyncRunnable(this.completer);