Skip to content

New Future constructor: Future.void #53364

Open
@srawlins

Description

@srawlins

If we want to change the signature of Future.value to feature a required parameter, then the shorthand, Future.value() (with zero args), used for Future<void>s or Future<Null> perhaps, would disappear. Future.void() would be a nice way to migrate code incrementally. Would there maybe be const / performance benefits to this as well?

Is there a similar incremental move for Completer.complete() (zero arguments)? Maybe a Completer.completeVoid() method? It would be cool to make it an extension method, in an extension on Completer<void>. Unfortunately, an extension on Completer<void> matches statically on any-and-all Completer types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.area-sdkUse area-sdk for general purpose SDK issues (packaging, distribution, …).library-asynctype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions