Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dart-native/codegen
Generator for dart_native bindings. Codegen can transform native SDK to Flutter plugin.
https://github.com/dart-native/codegen
binding codegen dart dart-native dartnative flutter generator
Last synced: about 3 hours ago
JSON representation
Generator for dart_native bindings. Codegen can transform native SDK to Flutter plugin.
- Host: GitHub
- URL: https://github.com/dart-native/codegen
- Owner: dart-native
- License: bsd-3-clause
- Created: 2020-02-26T02:13:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T17:32:30.000Z (over 2 years ago)
- Last Synced: 2024-11-01T15:48:27.068Z (14 days ago)
- Topics: binding, codegen, dart, dart-native, dartnative, flutter, generator
- Language: JavaScript
- Homepage:
- Size: 2.15 MB
- Stars: 79
- Watchers: 5
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# codegen
[![NPM Version][npm-image]][npm-url]
[![Build Status](https://travis-ci.org/dart-native/codegen.svg?branch=master)](https://travis-ci.org/dart-native/codegen)Generate Dart bindings from native code. It's based on [dart_native](https://pub.dev/packages/dart_native).
![](images/introduction.png)
You can use codegen to convert native SDK into Flutter SDK. Such as Login SDK:
![](images/login_sample.png)
Codegen is a part of DartNative. It's the cyan part(DartNative Codegen) in the picture below:
![](https://github.com/yulingtianxia/Blog-Hexo-Source/blob/master/source/resources/DartObjC/DartNative%20Future.png?raw=true)
It's still under development. Here's how it works:
![](images/theory.png)
## Installation
``` bash
$ npm install -g @dartnative/codegen
```## Requirement
``` json
"node": ">=14"
```## Usage
```
Usage: codegen [options]Generate dart code from native API.
Options:
-V, --version output the version number
-l, --language [objc, java, auto(default)] (default: "auto")
-o, --output Output directory
-t, --template Generate a shareable Flutter project containing
modular Dart code.
Specify the type of project to create:
[package, plugin]
--project-name The project name for this new Flutter project.
This must be a valid dart package name.
-h, --help display help for command
```## License
[BSD 3-Clause License](https://github.com/dart-native/codegen/blob/master/LICENSE).
[npm-image]: https://img.shields.io/npm/v/@dartnative/codegen.svg
[npm-url]: https://npmjs.org/package/@dartnative/codegen