Somewhat of an aside, since this article is about Flutter on embedded systems where React Native isn't even a consideration but...
I've used both Flutter and React Native. Hands down, Flutter is the more enjoyable experience. Everything from the language, to the toolkit, to the IDE, to the final product, is just BETTER.
React Native is a bloated, hacky, slow, garbage pile by comparison.
But I personally tried it and strongly disliked it. The toolkit and Android Studio run horribly slow - like really slow. And the output is basically this generation's flash. Some of the samples I tried on their gallery are mediocre. Very slight, but noticeable sluggishness. Some are just terrible; the 2d transformations moves at like 7fps. Plus there are so many other small things like issues with scrollbars, things that take time to sort out that native and web have had time to figure out. Also dart is a real PITA coming from typescripts which is basically c#.
Actually, the issue with dart is it's own whole thing. It was meant to be an alternative to js, but not ts has taken over with much greater success. I am not talking about aot or stuff like that - just the dev experience for app dev. Now it's in this really weird spot.
I just don't know. I would honestly have thought that flutter is dead in the water - every personal experience I've had with it has been bad, there are objective facts about it that are bad, and yet so many people love it.
- Flutter has built-in hot reload that enables fast iterations when designing an app. When you need to reset state though you have to reload the app which takes some time but it's not horribly slow.
- The performance of production builds is really good, better than any other cross-platform solution including web apps, PWAs, react native. I've got flutter apps running great on my cheap, old (circa 2015) phone with android 6.0. That's also a huge benefit of flutter, it can target older phones because it doesn't have many dependencies on native widgets etc, it just need a canvas to render.
- Dart not being a successful alternative to js(dart2js compiler), doesn't mean it's a bad language. In fact, Dart 2.0 was a serious update and the language now is great, with sane defaults and a nice standard library. I can't imagine any serious developer who knows at least one popular programming language like java,js,c# that would have problem with Dart. It's very easy to get used to it a couple of hours
> there are objective facts about it that are bad, and yet so many people love it.
- React native has fast refresh as well, and they recently (4-6 months ago) rebuilt it to be much faster and more stable
- The production builds of RN apps can be on par with fully native applications as well. Discord for iOS is entirely React Native and is probably the most performant app that I use on a daily basis.
> - Flutter has built-in hot reload that enables fast iterations when designing an app. When you need to reset state though you have to reload the app which takes some time but it's not horribly slow.
Just like Common Lisp and Smalltalk, and now being added to WPF/WinUI, SwiftUI, Jetpack Compose,....
You do not have to use Android Studio. Use it with Visual Studio code or your FOSS variant of it with the Flutter plugin. That works really well.
> Also dart is a real PITA coming from typescripts which is basically c#.
That's surprising to me. Coming from Ruby Dart was great. Not better, but when you are expecting a tuned up javascript Dart was such a nice surprise. I'd have expected it'd be the same for someone coming from C#. You worked with a current version and gave it a fair shot?
I'm in the Flutter is great camp. The UI you produce with it work great, and the whole process is great. Very powerful and at the same time manageable, a smart small concept at its core, with much around it that makes it powerful. Combine it with GetX and the code you get can also be really nice.
But for Linux? No way, not until they have got a proper beta that is not tied to snap. But maybe Sony is working on that and showing it here? Or I'm just not aware that this is not a real requirement, despite the website making it sound that way?
I've been following Dart since it's first release in 2012. I was able to be productive with right away back then. The JavaScript community freaked out because some Google exec in an email said Dart was a JavaScript killer. That did a lot of damage to it's acceptance. Dart was written with 2 things in mind afaik: 1) Replace Java based Google Web Kit used to write JavaScript (GMail circa mid 2000's) and 2) to serve as a backup language in Google lost the Java lawsuit with Oracle. Dart wasn't designed to be a shiny new thing like Swift, Rust or Kotlin, but more of a working language for day to day needs at Google. By those measures, Dart has succeeded admirably with Flutter taking off in popularity. Dart drew a lot of inspiration from C#, so I don't understand that complaint. C#, TypeScript and Dart are similar languages. Finally, Flutter/Dart should be compared to Blazor/C# and I think by that comparison, Flutter wins hands down.
I really like C# and .Net for getting the job done but Balzor runs Mono .Net in Wasm and the startup time is brutal for the public internet. 2 to 3 seconds. This leads me to believe Blazor is targeted at corporate intranets on high speed networks where you have a ready supply of C# programmers
I developed a fairly complex site using Blazor, starting back in the earliest releases. It was easy to deveolp for and having the depth of .Net (more and more features became available each release) was nice. I also found the build size to be an issue and wouldn't suggest using it for general purpose website. Microsoft really needs to focus on reducing the binary sizes.
ReveryUI seems like a nice project that works similarly to flutter, unfortunately they aren't sponsored by a giant company, but I would love to use reasonml/ocaml instead of dart (which is in no way a bad language, I just prefer to code in functional languages) to write apps.
Please don't hesitate to file bugs on any performance issues you see. We care very much about getting excellent performance. There are some specific hardware configurations that we are aware don't behave as well as we'd like (though nothing as bad as you're describing), but that's usually limited to pretty low-end phones where honestly even the OEM software doesn't perform that well...
Issues with/dislike of Dart is a pretty common refrain. This project is still very early days but the intent is to bring Flutter into Typescript https://github.com/chgibb/hydro-sdk
Eventually I hope to bring Flutter to C#, Haxe, and (maybe stretching it) eventually Kotlin, Java and Scala.
I genuinely don’t get the Dart hate, especially when TypeScript is the alternative. They are so similar.
But this is exactly what happened to Angular. There is a TypeScript version (fairly popular) and a Dart version (barely used outside of Google but is used for some of their biggest money making projects like AdWords).
I’ve only recently discovered Dart having come from Ruby land for the last 8 years and I could easily see Dart becoming my new go-to language in the future.
I think it’s currently criminally underrated and sadly doesn’t have a huge amount of adoption outside of Flutter at the moment but I’m looking to build my next serious web backend with it.
If you’re looking for a good introduction as to why I think it’s such a good language this video does a decent job of explaining the benefits https://youtu.be/J5DQRPRBiFI
"A new flutter plugin project, which supports flutter to interact with other scripting languages such as python, java, ruby, golang, rust, etc. It is easy to use, supports android and ios platform."
Full warning, I have zero experience with this plugin and zero experience with Flutter.
Thanks for the link! I actually haven't seen that project before.
As far as I can tell, starflut appears to offer basic script running with pass through of primitive types from Dart -> guest languages.
Hydro-SDK strives to offer far deeper integration between Dart -> guest languages up to and including extending from Dart classes in guest languages, and passing instances seamlessly back and forth with little overhead.
Very typical for debug builds though. It's really surprising how big the difference is! Especially on slow hardware. The last app I tested went from almost unusable sluggish to buttery smooth when changing from debug to profile/release mode.
Flutter is just for people who need to get something basic done without too much trouble, I think. It's been over a decade of mobile UI iteration and we still don't have something that does everything for all OSes in a declarative way, so I think we are just doomed to writing a native app for each platform if you want performance, correctness in terms of UI, and productivity.
And on the other side there is Ionic which is has no real performance issues (contrary to flutter), has the biggest ecosystem (the web) and is elegant, expressive, simple ->
The thousands of powerful web APIs, Angular and typescript
> The toolkit and Android Studio run horribly slow
I'm doing everything Flutter related with vim + CLI, so one doesn't have to work with android studio, even did so when trying a native Windows build (out of interest) a bit ago.
> And the output is basically this generation's flash.
I did some flash quite a while ago, and no that does not compare at al, similar to that it is not like Java. The closed comparison is possible Qt, from a built output.
> Some of the samples I tried on their gallery are mediocre.
That's true, and I never understood why they don't improve that, it hurts their publicity.
> I would honestly have thought that flutter is dead in the water - every personal experience I've had with it has been bad, there are objective facts about it that are bad, and yet so many people love it.
I thought about roughly the same a year and a half ago, a coworker then did some small private stuff with it, and we talked here and then, as the base premise still sounded interesting. Comparing it now to then it just shows how much improved and gives a glimpse to what more will be possible, and I now could imagine that it will stay and even become rather useful.
tldr; It's IMO far from dead in the water, but there's also quite a bit of work to do.
100% my experience. Everything feels backwards. Dart is huge turn off, there are too many widgets, non native views, horrible native view support. Flutter devs brag about how fast their apps are but honestly I have yet to find Flutter app which isn't sluggish
Can you point to some really well done, larger Flutter apps in production? Especially ones that run across multiple platforms but feel good in each?
I used to think the same of React Native a couple years ago but this year I picked it up again and was shocked how far its come - incredibly smooth experience, far better ecosystem, and it's hard (impossible?) to beat Chrome DevTools + VSCode. Runs fast, too.
The thing is, Flutter is a no-go for the web as of now, it delivers a huge bloated bundle that's not accessible or performant. But with React Native you can build an app that shares 90% of the code across all native platforms and the web, and feels/is more native on each of the three platforms.
Took me a while to get on board with Flutter, only really started enjoying it after I gave it a few goes. Coming to Dart after Swift and Kotlin feels like a big downgrade but languages aren't that important, as you said the whole environment is so much more streamlined than Android dev. I'm using it for Android only however and keeping my existing iOS app in Swift.
4. Checked exceptions (could be more powerful in Swift, but they are there, and when not used in excess they are actually pretty nice, and Swift's `try` syntax is excellent)
5. Swift's enums and `switch` feel both more straightforward and more powerful than Kotlin's sealed classes and `when` (I'm not sure about this, but I think there are situations where you get better coverage checking with Swift's pattern matching.)
6. Reified generics (I know that opinions on this vary, and it doesn't often matter, but I've been just writing some code where it's been nice to be slightly more type safe with Any values)
7. More principled null handling (Optional is just an enum, although with some extra syntactic support)
8. `if let`, `if case`, `guard let` and `guard case` allow for simpler handling of multiple values than Kotlin's `?.let` and null checks
I like Kotlin being more expression oriented, but in the end I often find my Swift code to be less contorted due to the more powerful conditional constructs. GC vs ARC isn't much of an issue, both work for me.
Ah my comment wasn’t that clear. What I meant was as nice as flutter is dart felt like a downgrade after working with kotlin and swift (both of which I like a lot)
I didn't like Flutter because I don't like deeply nested code, especially when you have to care about parentheses, braces, brackets and commas, and the standard indentation is only 2 spaces.
I've used both Flutter and React Native. Hands down, Flutter is the more enjoyable experience. Everything from the language, to the toolkit, to the IDE, to the final product, is just BETTER.
React Native is a bloated, hacky, slow, garbage pile by comparison.