Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Found some strange dart interface #383

Closed Answered by halildurmus
HaloWang asked this question in Q&A
Discussion options

You must be logged in to vote

...
I wonder could I use something like Pointer<List<int>> to write to dataWriter on the dart-side?

No, you can't (and you likely meant Pointer<Uint8> instead of Pointer<List<int>>, as the latter is not a valid Dart type).

And why DataWriter in dart hasn't method matching WriteBytes(array_view<uint8_t const> value) on the cpp-side?

This project is designed to provide an idiomatic Dart projection of the WinRT APIs, which involves substantial wrapping. For the sake of idiomatic usage, the method doesn't take a parameter like Pointer<Uint8>; instead, it accepts List<int>, which serves as the equivalent counterpart.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by HaloWang
Comment options

You must be logged in to vote
1 reply
@halildurmus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
type: question Further information is requested
2 participants