dart-native / dart_native

Write iOS&macOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.
BSD 3-Clause "New" or "Revised" License
951 stars 77 forks source link

provide extended examples and additional doco #29

Open bsutton opened 4 years ago

bsutton commented 4 years ago

I'm considering using dart native however there appears to be only minimal documentation and only trivial examples.

Are you able to provide some extended examples that call common iOS/Android funtions including examples that deal with callbacks and a variety of data types.

I note that there are a number of blogs written in Chinese, English translations of these will enable a far greater audience.

bsutton commented 4 years ago

I did actually get chrome to translate the blogs into english and it did a surprisingly good job.

yulingtianxia commented 4 years ago

Providing API docs is our next task. But there are also breaking changes until dart:ffi is stable.

bsutton commented 4 years ago

At this point I more interested in the high level processes.

How do you set a project, how do you generate code.

How do you call a function, How do you create a callback.

I would also guess than even with the ffi changes the api you are generating won't change much as the ffi calls should be buried in your code.

bsutton commented 4 years ago

Also what options to use when creating the flutter project.

I'm guessing as there is no object-c code in the project we can just create it as a package rather than a plugin.

yulingtianxia commented 4 years ago

At this point I more interested in the high level processes.

How do you set a project, how do you generate code.

How do you call a function, How do you create a callback.

I would also guess than even with the ffi changes the api you are generating won't change much as the ffi calls should be buried in your code.

Most technical solutions can be found in my blogs: http://yulingtianxia.com/tags/DartNative/ There are a lot of tech points using dark magic. BUT some articles in my blog may be outdated.

yulingtianxia commented 4 years ago

Also what options to use when creating the flutter project.

I'm guessing as there is no object-c code in the project we can just create it as a package rather than a plugin.

Codegen of DartNative wants to change all system/third-part SDK to Flutter package/plugin.

bsutton commented 4 years ago

At this point I more interested in the high level processes. How do you set a project, how do you generate code. How do you call a function, How do you create a callback. I would also guess than even with the ffi changes the api you are generating won't change much as the ffi calls should be buried in your code.

Most technical solutions can be found in my blogs: http://yulingtianxia.com/tags/DartNative/ There are a lot of tech points using dark magic. BUT some articles in my blog may be outdated.

The blogs are a little lacking in detail.

Really need to see more examples with an explanation of what is going on.