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

Native documentation should describe allowed types #53623

Closed
osa1 opened this issue Sep 27, 2023 · 1 comment
Closed

Native documentation should describe allowed types #53623

osa1 opened this issue Sep 27, 2023 · 1 comment
Assignees
Labels
area-documentation Prefer using 'type-documentation' and a specific area label. library-ffi

Comments

@osa1
Copy link
Member

osa1 commented Sep 27, 2023

Native documentation currently has no mentions of the types allowed in the function type.

Currently the only way for a user to find out the types is by looking at the example in the documentation:

@Native<Int64 Function(Int64, Int64)>()
external int sum(int a, int b);

And try to figure out what about Int64 makes it allowed in a @Native<...> (probably implementing NativeType), and find the other types with the same property (probably check out NativeType documentation to see implementers).

@osa1 osa1 added area-documentation Prefer using 'type-documentation' and a specific area label. library-ffi labels Sep 27, 2023
@dcharkes dcharkes self-assigned this Sep 27, 2023
@dcharkes
Copy link
Contributor

Correct, anything subtyping NativeType.

https://dart-review.googlesource.com/c/sdk/+/328260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Prefer using 'type-documentation' and a specific area label. library-ffi
Projects
None yet
Development

No branches or pull requests

2 participants