I want to use java/kotlin in flutter instead of dart programming language. Java/kotlin has many functionalities which dart is lacking. But flutter is good in UI UX. So I want to use flutter with dart, but java/kotlin also for back-end programming. How can I do that?
2
Answers
You can pass the data from the flutter code to the native code and vice versa.
Please check this reference – https://tanya-anand.medium.com/data-pass-between-flutter-and-android-using-the-method-channel-f0e8f7655fe
But this process is used when we want to use some features that are not provided by Flutter but we can fulfill it using native code. for eg – https://pub.dev/packages/home_widget
however, it might not be so efficient to follow this in the complete app and keep the data logic in Java/swift and UI in Flutter using the above-mentioned way.
Thanks.
I think this can help:
Develop the frontend UI and logic using Flutter and Dart.
Build a backend server using Java or Kotlin.
Establish communication between the Flutter frontend and the backend server using APIs.