Skip to main content

native_ui_builder_generator 0.0.1-beta copy "native_ui_builder_generator: ^0.0.1-beta" to clipboard
native_ui_builder_generator: ^0.0.1-beta copied to clipboard

A code generator for native_ui_builder that translates Dart AST into Swift and Kotlin.

native_ui_builder_generator #

This is the code generator package for native_ui_builder.

It utilizes build_runner and the Dart analyzer to parse classes annotated with @NativeComponent and automatically generates:

  1. SwiftUI Code (.swift) for iOS.
  2. Jetpack Compose Code (.kt) for Android.
  3. Dart PlatformView Wrappers (.native.dart) to seamlessly bridge the native components into your Flutter widget tree.

Getting Started #

You should not depend on this package directly in your dependencies. Instead, add it to your dev_dependencies alongside build_runner.

dependencies:
  flutter:
    sdk: flutter
  native_ui_builder: ^0.0.1-beta

dev_dependencies:
  build_runner: ^2.4.0
  native_ui_builder_generator: ^0.0.1-beta

Usage #

After defining a @NativeComponent in your Flutter app using the native_ui_builder primitives, run the generator:

dart run build_runner build --delete-conflicting-outputs

This will generate the required .native.dart, .swift, and .kt files. Please refer to the native_ui_builder package for complete instructions on how to use the framework and wire up the native code in your Xcode and Android Studio projects.

0
likes
140
points
117
downloads

Documentation

API reference

Publisher

verified publisherpinz.dev

Weekly Downloads

A code generator for native_ui_builder that translates Dart AST into Swift and Kotlin.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, build, native_ui_builder, source_gen

More

Packages that depend on native_ui_builder_generator