... let channel = FlutterMethodChannel.init(name: "/channel", binaryMessenger: controller) channel.setMethodCallHandler({(call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in // Process call.method and result }); GeneratedPluginRegistrant.register(with: self)
You can replace Flutter with other cross platform UI frameworks while keeping your logic code in Kotlin/Native * Kotlin/Native are still in beta but is usable already though with some limitations * Kotlin/Native works well to reduce the amount of platform specific code * Some glue code needs to be written to pass around/ serialize objects * Don’t be afraid to try out new technologies (but …)