1
votes

thanks for reading,

my original project is android project in java, then kotlin being integrated into project, now all new ui and business logic are written in kotlin, recently boss want this android app to be use by ios,

then i found flutter might be useful in this case, so i try to integrate flutter into project and test with it, my goal is to convert this project to be able to compile into android and ios, i'm very new to flutter,

after days of searching and testing,

i'm follwing guide at flutter.dev added flutter module to my android project, now able to call FlutterActivity from android activity, using flutterEngine initialRoute i'm able to call different dart file from flutter module, but as i dive deeper i feel that these doesn't seem right,

please correct me if i'm wrong =

  1. i'm unable to call kotlin files from flutter module in dart, (i have rewrite business logic in dart at flutter module?

  2. there are no ui files for dart, and i can't preview the ui like xml design view,

  3. the guide seem to be just focus on getting flutter to run in existing android app, (so this android project will still not be able to compile into ios?

my main goal is to compile existing android project to ios and try to not remake every coding if possible, but so far all the solution i found is telling me this project have to remake, sorry i'm out of option and i need help, i don't really need flutter if there is a better solution,

please advice how do i convert this project to be able to compile at both android and ios?

1
Flutter cannot make an existing Android app work on iOS. If you're completely new to Flutter, you're not saving yourself any more time learning Dart and Flutter than you would by learning Swift and iOS and rewriting your app that way. Unless Flutter is more useful to your future projects/career than Swift. - Tenfour04
@Tenfour04 thanks for reply, rewriting the app is the last thing i want, Flutter is the closest thing i found so i just give it a try. (Flutter app can compile into Android/iOS, and Flutter can integrate into existing Android project, so i got false hope that it maybe works). - Confusing

1 Answers

0
votes

if you want to know how flutter works and what is its difference from kotlin I strongly suggest you to look at this link : https://flutter.dev/docs/get-started/flutter-for/android-devs after it you can save lots of time. if I want to briefly reply your questions : in flutter you do not need code native code using kotlin or swift , you just write one code in dart language and when you build your app you have both ios and android sourse. as google said : Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.