by krzat · 8y ago · 0 comments
They took low level rendering API from Chrome (Skia) and build simple but fast layout engine around that. Already works pretty well on mobile and there are some experiments on desktops: https://github.com/rxlabz/flutter_desktop_markdown_reader
Rust people could maybe do the same with Webrender from servo.
The other part of the inefficiency is more to do with what the cross platform engine is internally guaranteeing vs what the platform providers will guarantee. For example, let’s say skia here always runs at 60fps. Great, and a lovely user experience - but does it then respect low power mode in iOS or Android, or does it just continue at 60fps eating away through battery power because it’s geared to the common case of all platforms?
I’d love this to work, but years of the reality of using cross platform renders has made me quite skeptical of their ultimate benefit to the user. They’re great for developers though - but that’s the wrong way round for convenience usually, I think.
Nevermind the fact that the ongoing maintenance burden is also a thing -- using iOS7 UI elements on iOS9 is probably a non-starter for a large part of the audience.
Today they would probably invest their time in React-Native or something.
The more interesting question is "Why does Flutter exist?" Google is, after all, a business. What's the ROI? Here's my theory: Google is known to be developing a new operating system from scratch called Fuschia[1]. Many many OSes have died in the crib because there was no app ecosystem for them, and thus the cost of switching to the "new thing" was too high for users. How do you solve this problem? Maybe if you create a cross-platform app development framework that lets developers write for the two incumbents while also ensuring compatibility with your new OS...
[1] https://9to5google.com/2018/01/23/what-is-google-fuchsia-os/
I don't care much about Google but they did pretty good job with Flutter:
1. No special designer needed, you do everything in code. That means everyone can use their preferred editor.
2. Hot reload - you change something and it changes in the running app.
3. Headless testing - No need to own iOS/Android device to test iOS/Android UI.
4. Nice tooling - autocompletion, formatting, etc. Everything done via command line, with optional support for IDE.
5. Extensible - very easy to write your own widgets. There is nothing special about provided components.
6. Platform agnostic - "native look" of Qt/GTK is a lie, they still look off. To me it just triggers uncanny valley vibe. Not to mention that they implement native look from 5 years ago or more. And completely useless on mobiles. Flutter looks the same on every platform unless specified otherwise. Way less platform specific bugs.