Flutter: Create a flutter project with Kotlin

浪尽此生 提交于 2020-01-14 12:58:08

问题


Flutter allows supporting of Kotlin language.

How can I integrate my Kotlin file with Flutter project?

There is no option to add/create a Kotlin file (in New menu) in Android Studio.


回答1:


I think the kotlin files can only be used in the platform-specific plugins. E.g. you have platform-specific implementation for both iOS and android and you can use kotlin for the Android part. The Flutter SDK is used directly with Dart.




回答2:


Open your Android module in android so you can add your kotlin files




回答3:


Flutter does not support Kotlin and it looks it will not allow Flutter to be written in Kotlin language. The biggest advantage of using Dart language is the management of the object. It has a great garbage collector. Don't you think google developers didn't think about that before? Of course, they did. But Dart is chosen as the one language of Flutter.



来源:https://stackoverflow.com/questions/49069905/flutter-create-a-flutter-project-with-kotlin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!