[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Java Futures to Dart Futures #1213

Open
HosseinYousefi opened this issue Jun 20, 2024 · 0 comments
Open

Convert Java Futures to Dart Futures #1213

HosseinYousefi opened this issue Jun 20, 2024 · 0 comments
Labels
contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) lang-java Related to Java support package:jni package:jnigen

Comments

@HosseinYousefi
Copy link
Member
HosseinYousefi commented Jun 20, 2024

@Anikate-De Feel free to tackle this.

One design could be to include a genericJFuture<$T extends JObject> extends JObject in package:jni/util/concurrent/jfuture.dart similar to JList.

This class can have a method called Future<$T> toDartFuture({bool releaseOriginal = false}) so we can use Dart niceties like await on it. I have included a way to do toDartFuture in #1211, with a bit of modification, you can reuse the same code.

@HosseinYousefi HosseinYousefi added package:jnigen package:jni contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) lang-java Related to Java support labels Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) lang-java Related to Java support package:jni package:jnigen
Projects
Status: No status
Development

No branches or pull requests

1 participant