Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How important selecting android language while creating a new flutter project?

When I create a flutter app with the android studio I see the options for selecting the specified language for both android and IOS. I do not know how to code with these languages so, I won't code with them. Therefore, I thought selecting one of them is not important for me, isn't it?

like image 296
Ertuğrul Çakıcı Avatar asked Sep 20 '25 07:09

Ertuğrul Çakıcı


2 Answers

Depends on whether your app will be requiring access to Android or iOS Platform API. In most cases, there are plugins available at pub.dev for many of the APIs. But in case there is no plugin available for the API you need(rare cases), you will need to write platform specific code (refer platform integration docs) in the language you selected at beginning.

In most cases, selecting the language won't matter but it is recommended to use Kotlin for Android and Swift for iOS.

like image 98
Aman Kumar Sinha Avatar answered Sep 22 '25 21:09

Aman Kumar Sinha


Normally, it doesn't matter whether you choose Kotlin or Java for Android, Swift, or Objective-C for iOS because you won't need these languages in Flutter app development unless you want to add platform-specific features.

For example, suppose you are working on a Flutter app and you need to add a specific functionality called 'XYZ.' But Flutter doesn't support that functionality. Normally, this won't be the case because Flutter provides built-in libraries or plugins to solve most problems. However, let's assume that the specific functionality is not supported in Flutter but is available in Kotlin and Swift.

In such cases, you would implement that specific functionality using Java or Kotlin for the Android app and Swift or Objective-C for the iOS app.

So, in those particular scenarios, you should have knowledge of either Java or Kotlin, and either Swift or Objective-C.

If you are familiar with Java, choose Java. If you are familiar with Kotlin, choose Kotlin. And if you are not familiar with any of these languages, then for Android, select Kotlin, and for iOS, select Swift. Kotlin is a modern and recommended language for Android app development by Google, while Swift is recommended over Objective-C by Apple.

The language you choose will be used to generate the code for both the Android and iOS apps, which I will demonstrate at the end of this video

like image 33
Muhammad Afzal Avatar answered Sep 22 '25 22:09

Muhammad Afzal