codegen
codegen copied to clipboard
Generator for dart_native bindings. Codegen can transform native SDK to Flutter plugin.
I'm trying to generate the dart_native dart code for the ios AVFoundation framework. When I run code gen it appears to be generating all of the files however it is...
I'm trying to generate code for the IOS AVFoundation.h headers. I've managed to get it to generate code (with lots of errors and warnings as it does the generation). However...
I'm trying to generate code for the ios avfoundation headers. I'm uncertain what paths to pass to the codegen tool: The xcode project has a Frameworks directory with a large...
1. [x] Generate empty Flutter plugin or package project in output path. 2. [x] Move generated Dart code into Flutter project. 3. [ ] Move iOS code and resource into...
先用 Foundation 试水,遇到的问题列在这个 Issue 里,逐个解决: 1. 生成代码功能问题: - [x] 枚举优化: NS_ERROR_ENUM, NS_CLOSED_ENUM - [ ] 区分泛型和协议,语法很相似,包含参数、返回值中的。('id' 和 `NSArray` 分别转成 `XXXProtocol ` 和 `List`) - [ ] 生成函数指针声明(FunctionPointer), 处理含有函数指针的内容,如 ``` @property...
有一些 API 是 C 函数,理论上可以自动生成 Dart 接口。 需要注意的是,需要 Native Header 文件暴露接口,可以参考 dart_native 中 `_dispatch_get_main_queue` 的实现,生成一层封装并通过 `DN_EXTERN` 暴露。或者想个更牛逼的解决方案,嗯。
There is an apinotes file in Apple's framework, which maps Objective-C API to Swift. We can use it to generate awesome dart code.
`$ codegen -h file:///opt/homebrew/lib/node_modules/@dartnative/codegen/lib/objc/DNObjectiveCConverter.js:1 import { InputStream, CommonTokenStream, tree as _tree } from 'antlr4' ^^^^ SyntaxError: The requested module 'antlr4' does not provide an export named 'tree' at ModuleJob._instantiate (node:internal/modules/esm/module_job:122:21)...