yoga_engine: implement adapter to ffi generated class
Closed this issue · 0 comments
Use case
In the current implementation of yoga_engine
all the bridge made between the native code and dart is generated through the ffigen
package. This approach was taken since the amount of methods that have to be converted and mapped is quite high.
However, since this generated code contains many methods that yoga
does not use and the final structure is not testable, it has been broken into some other classes with renamed methods and separate responsibilities.
Proposal
Given this scenario, if there is any change in the yoga
code, even using the ffigen
code generator, such changes have to be done manually, as the generated code was broken in other classes and arbitrarily changed. So the proposal is to make an adapter on top of the generated code and if there is any change in yoga
, it will be reflected more easily for the yoga_engine
.