News for hackers. Stuff that matters.
Re:Flutter is the most popular cross-platform mobile SDK by gefhfffh on Tuesday February 22, 2022 @06:35AM (#30426622)
IMHO another downside is Flutter not using native UI components, unlike React Native.
Re:Flutter is the most popular cross-platform mobile SDK by ozaiworld on Tuesday February 22, 2022 @07:07AM (#30426868)
On iOS, Flutter apps feel out of place. They don’t respond to common gestures, the Flutter team is always in catch-up mode with the latest iOS UI changes, and they don’t even support 120Hz refresh rate on the iPhone 13 Pro yet.
Re:Flutter is the most popular cross-platform mobile SDK by bmitc on Tuesday February 22, 2022 @10:36AM (#30429204)
I have been investigating Flutter and other solutions for cross-platform desktop GUIs, where I am not interested in mobile or web apps. For me and for this use case, I think I've landed on not caring about native UI components for GUI. It just doesn't work in my opinion because you're either at the whim of the OS in regards to their constantly changing UI components and UI guidelines/styles, for Windows and macOS, or you're in Linux land where such things don't exist. There's quite a few big applications that are on both Windows and macOS that don't follow either OS' guidelines or use native components.

If you're going true cross-platform across Windows, macOS, and Linux, I think it's hopeless to try and maintain three separate apps that look and feel like a supposedly native app should look and feel like, if there's such a thing anymore. Windows and macOS are not even consistent for their own apps and OS GUIs.

Re:Flutter is the most popular cross-platform mobile SDK by Comevius on Tuesday February 22, 2022 @07:00AM (#30426807)
- Flutter widgets can be made pixel perfect replicas of native UI components.

- Supporting older platforms is much easier with Flutter.

- You can use native UI components with Flutter if you want to, and mix them with Flutter widgets.

- Flutter has a tiny and fast runtime, React Native runs on Safari or Chrome. Flutter works great on embedded platforms too, such as IoT devices.

- Dart is similar to JavaScript, with the same runtime behavior, though obviously you can't use existing JavaScript libraries outside of the browser. You can use many WASM ones though.

Re:Flutter is the most popular cross-platform mobile SDK by mahkoh on Tuesday February 22, 2022 @07:25AM (#30427029)
>- Flutter widgets can be made pixel perfect replicas of native UI components.

How can I make flutter use native font rendering? I've played around with it a bit and fonts look completely off, don't respect my systems hinting settings, etc.

Re:Flutter is the most popular cross-platform mobile SDK by Comevius on Tuesday February 22, 2022 @09:48AM (#30428552)
Low PPI displays require subpixel antialiasing which is not yet supported.

https://github.com/flutter/flutter/issues/63043

Re:Flutter is the most popular cross-platform mobile SDK by mahkoh on Tuesday February 22, 2022 @10:35AM (#30429181)
That is unrelated to my question. I'm using hinting and have everything sub-pixel-related disabled. If flutter does not support this, then flutter cannot look native.
Re:Flutter is the most popular cross-platform mobile SDK by Comevius on Tuesday February 22, 2022 @01:39PM (#30431700)
Flutter uses Skia, Harfbuzz and FreeType under the hood. The last two is used by almost every other software for text shaping and rasterization.

You should open an issue if your font configuration is not applied, although on Android, iOS and macOS font hinting is not relevant, and I think on Linux fontconfig is used. I don't know about Windows.

Re:Flutter is the most popular cross-platform mobile SDK by JofArnold on Tuesday February 22, 2022 @08:07AM (#30427432)
Small correction: RN uses their own custom JS engine Hermes.
Re:Flutter is the most popular cross-platform mobile SDK by Comevius on Tuesday February 22, 2022 @09:35AM (#30428369)
Thanks for the correction, haven't kept up with React Native for a while. It indeed uses Facebook's own JS engine.

https://reactnative.dev/blog/2021/10/26/toward-hermes-being-...

Re:Flutter is the most popular cross-platform mobile SDK by akmarinov on Tuesday February 22, 2022 @06:45AM (#30426686)
Also: - People have to learn Dart, where React-versed devs are plentiful

- Can’t share code between the web app and the mobile app

Re:Flutter is the most popular cross-platform mobile SDK by stevewodil on Tuesday February 22, 2022 @06:55AM (#30426774)
Dart is pretty easy to learn and you can use the same code base for a web and mobile app if you were inclined
Re:Flutter is the most popular cross-platform mobile SDK by akmarinov on Tuesday February 22, 2022 @07:02AM (#30426828)
Sure, it's easy to learn, but why bother when you can just use React Native? Also there are a ton of senior people with lots of years of experience to hire, where Flutter seniors basically don't exist.

With React being prevalent on the web front, why would anyone do a Flutter web app + mobile app?

Re:Flutter is the most popular cross-platform mobile SDK by ToddWBurgess on Tuesday February 22, 2022 @07:29AM (#30427074)
Flutter release code compiles to AOT code which speeds up execution. React Native has the Javascript engine which can slow things down. For most of us here on HN, who are using flagship phones none of this really matters, however for other parts of the world that have less capable phones, the ability to run AOT compiled apps is a big deal. Flutter is a huge in Africa, mostly because it runs well on a lot of the popular phones there.
Re:Flutter is the most popular cross-platform mobile SDK by hunterb123 on Tuesday February 22, 2022 @08:18AM (#30427547)
Maybe in theory but JS JIT engines are very fast and Flutter can be janky especially on iOS.

Both will perform well, I've made advanced applications on RN that perform well.

Re:Flutter is the most popular cross-platform mobile SDK by stevewodil on Tuesday February 22, 2022 @12:54PM (#30431028)
They must exist because I’ve been passed up on senior flutter roles. It can’t be me, right?
Re:Flutter is the most popular cross-platform mobile SDK by encryptluks2 on Tuesday February 22, 2022 @06:59AM (#30426804)
Except I have yet to find a Flutter site that isn't bloated. It makes about as much sense to just focus on PWAs now.
Re:Flutter is the most popular cross-platform mobile SDK by voiture_rapide on Tuesday February 22, 2022 @08:51AM (#30427873)
Using Flutter Web now, and sharing code between web app and mobile. Early but working well for us.
Re:Flutter is the most popular cross-platform mobile SDK by sakarisson on Tuesday February 22, 2022 @09:42AM (#30428465)
How does web accessibility work if everything is rendered in canvas? Interested in the topic, but this would be a potential deal-breaker for me.
Re:Flutter is the most popular cross-platform mobile SDK by opencl on Tuesday February 22, 2022 @10:08AM (#30428834)
I'm not sure how it's implemented, but Flutter does work with screen readers.

https://docs.flutter.dev/development/accessibility-and-local...

Re:Flutter is the most popular cross-platform mobile SDK by marwis on Tuesday February 22, 2022 @04:30PM (#30434116)
Transparent DOM elements with aria attributes overlayed on top of canvas is a typical solution to this problem.
Re:Flutter is the most popular cross-platform mobile SDK by divan on Tuesday February 22, 2022 @06:50AM (#30426726)
Could you elaborate on why is it a downside?
Re:Flutter is the most popular cross-platform mobile SDK by vetinari on Tuesday February 22, 2022 @07:37AM (#30427161)
It brings its own widget implementation, with themes that approach, but do not perfectly match the native toolkit.

The downside is, that it doesn't implement the platform look&feel perfectly. If you want fully custom look and feel, it might be not a bad thing, but those who aim at native experience, they will never reliably get it.

---

On the other side of the debate, React Native, it is not all roses either. While it uses native widgets, it also runs JavaScript. And not just any JavaScript engine, or your preferred JS engine, but JSC. With JSC, RN team took their sweet time to support 64-bit Android properly, with issues rearing as late as 2020.

Re:Flutter is the most popular cross-platform mobile SDK by divan on Tuesday February 22, 2022 @11:37AM (#30429984)
Before I started writing Flutter I had the same feeling. My first reaction to the Flutter design was "haha, it's not gonna work". But when I tried to make my first app I was shocked how good it was.

Since then I learned that most users do not give a s...t if it's pixel in pixel perfect copy of native components. Especially when Flutter team makes it literally pixel in pixel perfect to the native UI. I mean, it really doesn't matter in 99.99% cases in my experience (I have around 12 apps in Flutter atm).

So I see this Flutter design feature as huge upside, not a downside.

Re:Flutter is the most popular cross-platform mobile SDK by jamil7 on Tuesday February 22, 2022 @08:42AM (#30427797)
To add to the other replies here. It also puts the project in a precarious position since there is a huge amount of work involved in reimplementing UI controls from scratch and keeping them up to date with the platforms. If Google drops it or winds down their commitments, it would need backing with equally deep pockets to survive.
Re:Flutter is the most popular cross-platform mobile SDK by sfe22 on Tuesday February 22, 2022 @06:56AM (#30426781)
It will not have a native feel I guess, so it will feel a bit off to both android and iOS users
Re:Flutter is the most popular cross-platform mobile SDK by divan on Tuesday February 22, 2022 @11:40AM (#30430020)
Have you actually tried it or it's just a guess? I had similar thoughts before I tried myself, and actual experience is completely opposite. People don't care if it "feels off" (especially when it's pixel-to-pixel perfect and you literally have no way to distinguish native components from "non native" – in the end it's just a bunch of pixels sent to the GPU).

I mean, Flutter is stupidly good at this.