You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I think the use case is a bit uncommon, we should explore enabling this. However, preferably without complicating the API for the case in which there is just one.
Currently we have a top-level init, and top-level functions that can be called.
We could consider wrapping those in a class that has as a single member the DynamicLibrary and having all the functions as methods on the object.
That does slightly regress the usage, but if people use it with named imports, it does not really matter whether they write named_import.someFfiFunction() or an_object.someFfiFunction(), and they can just make that object a toplevel definition that they import everywhere.
@mannprerak2, maybe we should address this before releasing v0.1 because it changes the API.
The text was updated successfully, but these errors were encountered:
…de (#25)
Closes #10.
Moves the functions from toplevel to a class to facilitate being able to use the bindings more flexibly.
* Replaced config init-function-name with name and description.
* Handled name conflicts - Function-Function, Typedef - Function - Struct/Enum.
* Updated examples and clang_bindings, Updated tests.
See dart-lang/sdk#42082.
While I think the use case is a bit uncommon, we should explore enabling this. However, preferably without complicating the API for the case in which there is just one.
Currently we have a top-level
init
, and top-level functions that can be called.We could consider wrapping those in a class that has as a single member the
DynamicLibrary
and having all the functions as methods on the object.That does slightly regress the usage, but if people use it with named imports, it does not really matter whether they write
named_import.someFfiFunction()
oran_object.someFfiFunction()
, and they can just make that object a toplevel definition that they import everywhere.@mannprerak2, maybe we should address this before releasing v0.1 because it changes the API.
The text was updated successfully, but these errors were encountered: