this post was submitted on 23 Sep 2023
2 points (100.0% liked)

Mobile Development ๐Ÿ“ฑ | iOS and Android Programming

114 readers
1 users here now

A community for all things related to iOS and Android application development. Also check out /c/mobile and /c/swift.

founded 1 year ago
MODERATORS
 

Been looking at dart-flutter relationship recently... seen what it can do... pretty amaizing! Two birds with one stone is real!

Before jumping to it, i soldem wonder;

  • what are the compromises that one would face upon embarking this?
  • can these comporises be that bad? (compared to native ios/android app dev)
  • how bad are the work-arounds (if they exist) to these compromises?

PS: any extra information would be highly appretiated ๐Ÿ˜Š

you are viewing a single comment's thread
view the rest of the comments
[โ€“] RegalPotoo 1 points 1 year ago (1 children)

Can't talk to react native, but I spend my week building a Flutter app that targets iOS, Android and Windows.

Flutter will always be a compromise (performance, native "feel") if you are comparing against building 3 separate native apps from scratch, but in our case at least we got ~90% of the way there but only had to spend ~30% of the effort - we don't have the money to build 3 separate apps, so in the end the compromise is well worth it.

The main caveat for Flutter is that desktop support is pretty jank at the moment. It's "production ready", but there are a few things that don't exist on desktop (flavours being the main one that is annoying me at the moment), and a lot of the package ecosystem hasn't implemented support for windows yet - this is only an issue if the package needs to interact with platform APIs, regular dart code works fine cross platform.

[โ€“] 0_0j 1 points 1 year ago (1 children)

Wow, on windows too? Awesome...

Apart from native look and feel, any other areas where dart-flutter struggles?

I mean, how are the platform APIs... do they behave as expected?

[โ€“] RegalPotoo 2 points 1 year ago* (last edited 1 year ago) (1 children)

Platform APIs are a mixed bag. Flutter itself provides low level IO and networking, and a framework for bridging Dart code and native code (C++/Kotlin/Swift), and not much else besides. Most of the platform stuff is exposed through packages, some of which the Flutter team maintain, but most of which are 3rd party.

Some of them are well written, actively maintained and support all platforms, but many aren't. Some times you run into issues where the package is trying to paper over the fact that there aren't direct equivalents for all APIs, and you just have to deal with it.

I guess the conclusion is that Flutter isn't magic - for everything beyond the most trivial apps you are going to have to do platform specific stuff to make it work, but the existing stuff gets you most of the way there and gives you the tools to fix the problems.

Personal preference, but I really like Dart as a language. The typing system is great, async is sane, and the standard library is really well designed.

Edit: Obviously, flutter also provides a UI framework - out of the box this is designed for Material UIs, but there are packages that implement widgets for other UI design systems

[โ€“] 0_0j 1 points 1 year ago

Appreciate the time you took to type all these good sir...