https://github.com/buijs-dev/klutter-cookbook
Recipes for working with klutter
https://github.com/buijs-dev/klutter-cookbook
Last synced: over 1 year ago
JSON representation
Recipes for working with klutter
- Host: GitHub
- URL: https://github.com/buijs-dev/klutter-cookbook
- Owner: buijs-dev
- License: mit
- Created: 2023-05-16T05:47:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-24T15:59:23.000Z (about 2 years ago)
- Last Synced: 2025-01-21T21:46:49.020Z (over 1 year ago)
- Language: Dart
- Size: 2.83 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pub.dev/publishers/buijs.dev/packages)
[](https://github.com/buijs-dev/klutter/blob/main/LICENSE)

Klutter is a framework which interconnects Flutter and Kotlin Multiplatform.
It can be used to create Flutter plugins.
This cookbook contains examples of both the platform (Kotlin) and ui (Flutter) code.
All recipes are based on Klutter version 2024.1.3.beta.
## Local setup
Before following a recipe locally, you need to set up [kradle](https://buijs.dev/kradle-1/)
by running the following command in the example:
```shell
./gradlew klutterGetKradle
```
Create a kradle.env file in the example root directory with the following content:
```properties
cache={{system.user.home}}/.kradle/cache/
output.path={{project.build}}/klutter
skip.codegen=false
protoc.url=https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-osx-universal_binary.zip
```
In the root **and** root/android folder add local.properties with the following content:
```properties
sdk.dir=/path-to-your-android-sdk
flutter.sdk=/path-to-your-flutter-dist
```
You can then build the project simply by running:
```shell
./kradle build
```
The example app can be started from root/example/lib/main.dart.
## Recipes
- [Hello World](hello_world)
- [Stateless UI](stateless_ui)
## Migration Guides
Upgrading klutter is not always straightforward, due to its beta status.
See migration guides for more information.
- [2023.1.1.beta to 2023.3.1.beta](migration/2023.3.1.beta.md)
- [2023.3.1.beta to 2024.1.3.beta](migration/2024.1.3.beta.md)