Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implement nullable return values #98452

Closed
flutter/packages
#849
@gaaclarke

Description

@gaaclarke

description

As part of our move on the ecosystem team to map native APIs more closely, we should allow returning nullable values.

example

Example: flutter/plugins#4732 (comment)

workaround

Wrapping return values into objects can workaround the issue

class Foo {
  int? nullableResult;
}

@HostApi()
abstract class Api {
  Foo foo();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listp: pigeonrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions