Skip to content

Convert Java Futures to Dart Futures #1213

@HosseinYousefi

Description

@HosseinYousefi

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributions-welcomeContributions welcome to help resolve this (the resolution is expected to be clear from the issue)lang-javaRelated to Java supportpackage:jnipackage:jnigen

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions