Klutter plugin makes it possible to write a Flutter plugin for both Android and iOS using Kotlin only.

Overview

GitHub license Codecov

The Klutter Framework makes it possible to write a Flutter plugin for both Android and iOS using Kotlin Multiplatform. Instead of writing platform specific code twice in 2 languages (Swift + Kotlin), it can be written once in Kotlin and used as a Flutter plugin.

Important: Klutter is in alpha and not yet published to PUB.

Getting started

Installation

Add the Klutter library to dev_dependencies in the pubspec.yaml:

dev_dependencies:
  klutter: ^0.1.0

Then run:

flutter pub get

Use plugins

Plugins build with the Klutter Framework work slightly different than regular plugins. First install the dev dependency. Next run the android command to setup Gradle:

flutter pub run klutter:android

This task will do 3 things for your Flutter project:

  • Create a .klutter-plugins file in the root folder.
  • Create a new Gradle file in the flutter/packages/flutter_tools/gradle.
  • Update the android/settings.gradle file to apply the newly generated Gradle file.

The .klutter-plugins file will register all Klutter made plugins used in your project. The created Gradle file in the flutter_tools manages the plugins and enables them to be found by the Flutter project.

That's it! Now you can use plugins made with Klutter in your Flutter application by adding them to the dependencies in the pubspec.yaml. Register it in your project by running klutter:add. For example to add the library 'awesome_plugin' to your project run:

flutter pub run klutter:add awesome_plugin  

This will add the awesome_plugin to the .klutter-plugins file.

Create plugins

Start by creating a new Flutter plugin project. You can do this using the wizard in Android Studio or by running the following command, substituting 'org.example' with your organisation name and 'plugin_name' with your plugin name.

flutter create --org com.example --template=plugin --platforms=android,ios plugin_name

Then install the dev dependency. //TODO continue

You might also like...

A Flutter Accident reporting App working in both iOS and Android

Flutter Accident Reporting App A Flutter Accident reporting App working in both iOS and Android.This project total size of all Dart files is 4714 bite

Aug 28, 2022

💳 A Flutter package for making payments via credo central. Provides support for both Android and iOS

💳 Credo Package for Flutter TODO: Put a short description of the package here that helps potential users know whether this package might be useful fo

Dec 26, 2021

A horoscope forecasting application for both Android and iOS

A horoscope forecasting application for both Android and iOS

Zodoscope A Horoscope Forcasting Application Built with Flutter, for Android and iOS API used: http://horoscope-api.herokuapp.com/ Key Features All Zo

Apr 8, 2022

This project was writed with pure dart code,which means it's support both iOS and Android.

This project was writed with pure dart code,which means it's support both iOS and Android.

This project was writed with pure dart code,which means it's support both iOS and Android. Screenshot Todo show/hide animation Usage You can find the

Sep 6, 2022

Notefy - Task Saving App for both Android and iOS

Assignment for Flutter Developers Goal of the assignment is to: - Show the capa

Jan 25, 2022

🎬 A movie catalog app for both Android & IOS ~ Flutter.io project in Dart | Dart, Bloc, Movies

Movie Catalog App 🎬 Browse through movies from the YIFY api Getting Started For help getting started with Flutter, view our online documentation. Tod

Feb 23, 2022

Schedule & run Dart code in the background on both Android & iOS

flt_worker The flt_worker plugin allows you to schedule and execute Dart-written background tasks in a dedicated isolate, by utilizing the WorkManager

Jul 20, 2022

A port of kotlin-stdlib for Dart/Flutter including immutable collections (KtList, KtMap, KtSet) and other packages

A port of kotlin-stdlib for Dart/Flutter including immutable collections (KtList, KtMap, KtSet) and other packages

kt.dart This project is a port of Kotlin's Kotlin Standard library for Dart/Flutter projects. It's a useful addition to dart:core and includes collect

Sep 12, 2022

Safe is an open source mobile platorm to discretely capture incidents with ease, powered by an SMCE written in native Swift and Kotlin.

Safe is an open source mobile platorm to discretely capture incidents with ease, powered by an SMCE written in native Swift and Kotlin.

Safe A powerful tool for personal and community safety. joinsafe.me » Available for iOS & Android ~ Links will be added once a release is available. ~

Aug 31, 2022
Releases(v0.2.3)
  • v0.2.3(Aug 26, 2022)

  • v0.2.0(Aug 25, 2022)

    • Changed gradle plugin id to dev.buijs.klutter
    • Uses Klutter Gradle v2022.r6-8.alpha.
    • New project template uses Klutter DSL to apply Klutter dependencies.
    • Flutter generated files are removed from lib folder after klutter init.
    • Moved task klutterInstallPlatform from generated build.gradle.kts to Gradle plugin.
    • Renamed task klutterInstallPlatfrom to klutterBuild.
    • Moved task klutterCopyAarFile from generated build.gradle.kts to Gradle plugin.
    • Moved task klutterIosFramework from generated build.gradle.kts to Gradle plugin.
    • Changed platform build.gradle.kts to create an XCFramework instead of fat framework for iOS.
    • Bugfix App does not work on Mac M1.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.3(Jul 2, 2022)

  • v0.1.2(Jul 1, 2022)

    • Uses Klutter Gradle v2022.r6-6.alpha.
    • Added adapter library with improved AdapterResponse class.
    • As of 0.1.2 Klutter is required as dependency instead of dev_dependency.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Jun 29, 2022)

  • v0.1.0(Jun 27, 2022)

    • Uses Klutter Gradle v2022.r6.alpha.
    • Initial version with iOS and Android support.
    • Contains the tasks:
      • klutter:consumer init
      • klutter:consumer init=android
      • klutter:consumer init=android,ios
      • klutter:producer init
      • klutter:producer install=platform
      • klutter:producer install=library
    Source code(tar.gz)
    Source code(zip)
Owner
Gillian
Full stack developer Java | Kotlin | Dart - Flutter | Klutter!
Gillian
The classic to-do application where a user can write down all the things he wants to accomplish. Android only.

todo-app The classic to-do application where a user can write down all the things he wants to accomplish. Android only. Table of Contents todo-app Tab

Samuel Marques 8 Aug 29, 2022
Write iOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.

Dart_Native Dart_Native operates as both a code generator tool and a bridge to communicate between Dart and native APIs. Replaces the low-performing F

DartNative 862 Sep 13, 2022
Flutterbodydetection - A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmentation APIs for both static images and live camera stream.

body_detection A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmen

null 14 Sep 15, 2022
Flutter Local Notifications - Learn how to implement local notifications into both Android and iOS using flutter_local_notifications plugin.

Flutter Local Notifications Example Flutter Local Notifications - Learn how to implement local notifications into both Android and iOS using flutter_l

Sandip Pramanik 7 Aug 4, 2022
In this app, it's possible to find some different kind of flutter animations

flutter_animations Apprendre à utiliser les animations avec Flutter Getting Started This project is a starting point for a Flutter application. A few

MOISE Rajesearison 0 Dec 24, 2021
A Flutter plugin to get location updates in the background for both Android and iOS

Background Location A Flutter plugin to get location updates in the background for both Android and iOS (Requires iOS 10.0+). Uses CoreLocation for iO

Ali Almoullim 174 Sep 22, 2022
A Basic Currency Converter made for both iOS and Android using the flutter.io platform

FlutterCurrencyConverter A Basic Currency Converter made for both iOS and Android using the flutter.io platform This app uses the ExchangeRate-API for

Carlo Gabriel Villalon Tapales 41 May 4, 2022
A mobile application for both android and ios made for work out and fitness purpose

It's a mobile application for both android and ios made for work out and fitness purpose with many features you can read about here, but it can be used under all subject you want, well architected code and organized !

Gwhyyy 13 Sep 18, 2022
Telnyx flutter - A Flutter package for both android and iOS which helps developers with Telnyx API services

Telnyx Flutter A Flutter package for both android and iOS which helps developers

Kfir Matityahu 0 Jan 23, 2022