Do you know of any project that is trying to use F...
# announcements
f
Do you know of any project that is trying to use Flutter with Kotlin instead of Dart?
g
Probably not possible, not a priority for the Flutter team. What you can do instead is to abstract as much as possible into kotlin native and use it from dart. OLX guys presented a small PoC recently, that does that.
j
one app supporting 2 platforms (ios+android) and 2 multiplatform libs (kotlin native+flutter) and 3 languages (swift, kotlin, dart) sounds like a nightmare 😱
3
d
Couldn't Kotlin MPP theoretically be developed to also target the Dart VM (along with the other targets)?
j
I'm not an expert but from attending meetups and talking to ppl working w/ Flutter they said Dart and Flutter is like Ruby on Rails. In particular the platform creates a lot of small temp objects and the vm is specifically tuned to handle these scenarios. If any dart experts avail please retort me.
so its compiler, vm and tooling...
everyone's mileage may vary but thats a few too many levels of abstraction for me to avoid using swift
kn is a better compromise imo
d
Kn is great, but I did read a good point made by someone, which is that business logic is 20-30% of code while UI code is the rest
If that's true (not sure, and depends on app obviously), then some shared UI definition via Kotlin (however that happens) would be great
j
depends on app. I've worked on apps where 90%+ was business logic and others where reverse
kn is possible to share: presenters, networking, serialization, persistence, business logic. if those are big parts of app theres opportunity for a lot of common logic
d
I'd be curious to see how far one could push the boundary into common / MPP. Thus far my thought is having domain / business logic all the way to Presenter/viewmodel with view interface all in Kotlin
☝️ 1
j
I've been exploring that question myself. I think many others are as well. As usual it probably depends
d
Indeed. I would think you could even abstract navigation between screens into Kotlin, with just having implementations for how to actually render that screen / transition (i.e. startActivity) in platform code
j
Yes. I've been working on some POC. My lacking iOS/Swift knowledge is holding me back though 😞
g
yeah, iiric, the luxury of shipping your own VM with the app allows you to have such awesome things as Hot Reload on flutter, where on Android let's not talk about Instant Run... Kotlin transpiling into Dart is a valid question tho, but I'm not informed enough on this subject.
j
I don't know enough either. The question came up at a meetup I was at and the vm/gc was response but the tooling/ecosystem would be by far my biggest concern
i
Reason they do Dart for Hot Reload.
f
I was hoping someone is working on a Kotlin to Dart transpiler.
g
I'm pretty sure nobody working on a Kotlin to Dart transpiler