r/FlutterDev • u/realrk95 • Apr 20 '22
Discussion State of Flutter in 2022
I have been using Flutter since 2020 for building products of my company. Since our primary user base is in Android and iOS, it seemed like a good idea.
So I started to do some research to see if our internal tools and some of our desktop product offerings can be re-built using Flutter. We got a big sad NO. Here is what all went wrong:
Horrible performance on web. Tried HTML and CanvasKit. FYI our product is a web app and not intended as a static page. Images are pixelated, scrolling and zooming is the absolute worst and don’t get me started on the animation jank.
We use Firebase extensively for machine learning, auth, and analytics. FlutterFire has no official support for Windows or Linux (which is majority of our users).
No cross platform libraries like Bluetooth, USB and other IO. Some support is there for one or more platforms, but not even a single IO plugin is available that supports all platforms. The devices our company makes can be used via NFC, BLE or USB.
Battery consumption and performance of Skia also isn’t that good. A flutter app idling consumes significant power.
I do not understand Google in this regard. They’re heavily promoting flutter but not focussing on the core elements that make it a cross platform framework to begin with.
We are now looking to move towards a JS framework (preferably react with electron for desktop). Even though I absolutely love dart, I feel like I’m being forced to make this choice.
What do you think? Will Flutter improve in time to keep developers interested?
EDIT: My desktop performance issues (point 4) are on Mac M1 running Flutter desktop. Am assuming the problem is optimisation and due to Rosetta. Also adding the following:
5. Google Maps not supported on Windows, Mac or Linux. Even on web, abstraction is needed. It’s Google’s own product and I think absolutely necessary for Flutter.
6. Notifications are not present for Windows and Web. I’m using flutter_local_notifications, and it is very good but again, it’s the incomplete package implementation considering Windows has around 70% market share of desktops.
44
u/Hixie Apr 20 '22
If you have examples of the performance problems on web it would be really helpful if you could file them as issues. We've done a lot of work on web performance in the past few months but often we find that there's a corner case we hadn't considered that drags everything down, or a particular combination of features that interacts in ways we weren't expecting, etc. The web is particularly thorny in this way, it was never designed for what we're making it do with Flutter. (Indeed, we originally started Flutter because we thought it was impossible to make the web do this at all, so the fact that Flutter runs on the web is sort of 🤯 for me.)
Also please make sure to mention what hardware you're testing on. Hardware can make a huge difference here.
3
u/realrk95 Apr 21 '22
The community and I really appreciate the work being done by the Flutter team. I will be filing any issues I come across. The few that I had filed before were closed and redirected to an existing unsolved issue. Do let me know how and where I/we can be of help. I am not an expert, but I need to learn how to contribute.
5
u/surgency23 Apr 21 '22
I just wanted to say that while there are issues with flutter I truly enjoy the product you guys are providing. As someone who has no business with UI work I have made what I consider really good looking apps. Keep up the good work and all of the other pieces will fall into place! (Also please keep doing the boring show, I absolutely love watching real development happen rather than quick cuts of semi working pre coded projects)
3
u/matt-at-work-2021 Apr 22 '22
I wish Flutter wasn't trying to support web apps. Flutter on the web seems a long way from being a practical, competitive approach to web development. I'd much rather that efforts to improve Flutter were spent on making other platforms better.
I don't want to be a drag, but I know I'm not the only one that feels this way.
What is the best way for an ordinary rando like me to register this opinion with Flutter leadership?
8
u/Hixie Apr 22 '22
One of the things I was surprised to learn when my role became more of a leadership role on Flutter is that very little software investment is a zero-sum game. I could tell our web folks to stop working on Flutter web, but the effect wouldn't be that they move to Flutter desktop, it would be that they move to some other web-related project they're interested in, like Chrome. Similarly, expertise in one area like performance doesn't translate to expertise in another area like accessibility. This is even more true in the open source world. For example, a lot of our Linux investment comes from Canonical, and I (as a Googler) have zero authority over what they work on.
That's not to say that there's not some level of influence we can have, and of course to some extent there's trade-offs to be made. In theory, if we weren't growing as a team, then in principle we could replace one engineer interested in X with an engineer interested in Y, and thus move investment from X to Y. But that's not very nice to the engineer working on X, whose career we might be negatively influencing by asking them to leave, and in any case it's moot while we're still growing, since we can grow one area (like desktop) and not another (like web) if we're trying to shift the focus of our investment from one to the other.
All that said, I'm not sure I agree with your premise. Our web investment has been quite popular, and even if it wasn't, would be hugely valuable even if it was never used in production. The fact that you can literally play with live Flutter in our API docs alone makes all our investment in web worth it, IMHO.
What is the best way for an ordinary rando like me to register this opinion with Flutter leadership?
Consider it registered. :-)
In general our quarterly surveys are a major tool we use to drive strategy, that's probably the best answer to your question.
1
u/matt-at-work-2021 Apr 25 '22
Interesting examples and explanation, thank you for sharing and taking the trouble.
I perceive that my point of view on Flutter Web is fairly common, but it's possible that's just confirmation bias.
I do agree that live interactive examples as part of the Flutter documentation are cool and valuable.
I've seen those quarterly surveys and will keep an eye out for them in the future.
21
u/Cazineer Apr 20 '22
Our experience was quite similar. Flutter will get there in another 12-24 months I believe.
3
5
21
u/No-Lengthiness-5821 Apr 20 '22
You know your requirements better than anyone else. I don't think I would choose Flutter for a web focused app - its primarily mobile. Desktop is coming along nicely but may not be mature enough yet. YMMV
2
u/aryanr64x Apr 21 '22
The biggest problem with flutter web is seo. Can't build production websites without good seo these days.There is a reason why something like nextjs blew up.
-17
u/realrk95 Apr 20 '22
True, but I think the reason why we’re using Flutter is because of the promise of cross platform. If it only supported Android and iOS. No one would use it. Come to think of it, even some iOS apps built on Flutter are janky.
Plus, my users don’t care if the app is in a browser or an executable. As long as it runs.
36
u/OldHummer24 Apr 20 '22
Strongly disagree, I and many others use it only for mobile and it's great.
-1
u/realrk95 Apr 20 '22
I have compiled and tested the syncfusion app from Github and the memory utilisation is greater on iOS than Android. Try the Flutter gallery app or syncfusion and when you navigate between 2 pages or a large widget loads, you’ll see the jank (I have iPhone 13 128GB model). It’s not a big issue, but is definitely there and not noticeable in my Android (K20 pro).
7
u/look1n Apr 20 '22
Did you run it in release mode? SkSL warmup is helping a lot with jank issue (https://docs.flutter.dev/perf/shader) and jank expected to be fixed in 2022 flutter development roadmap (https://github.com/flutter/flutter/wiki/Roadmap).
1
u/realrk95 Apr 20 '22
Not sure, I’m sure apps deployed to Play/App Store are in release mode only. Thanks for info of roadmap. Will have a detailed look!
7
u/s_ecki Apr 20 '22
many people use it for cross platform mobile only
0
u/realrk95 Apr 20 '22
Sure, the use case there is spot on. But I, like many others have spent time learning and mastering some aspects of the framework. Would be good if desktop is supported without the need of a lot of abstraction.
1
u/jush Apr 21 '22
Did you look at other alternatives like Qt/QML that support all platforms you mentioned?
1
u/realrk95 Apr 21 '22
I have used PyQt before. I would prefer not to use C++ as far as possible and the default widgets/components look like it’s from the 20th century. But I use FastAPI + React for our machine learning training pipeline. PyQt is good but again isn’t good enough for IoT apps and Android compilation is a joke. Tried Kivy, which has horrible UI components.
5
Apr 20 '22
If it only supported Android and iOS. No one would use it.
Except of course for mobile developers who only need it to support Android and iOS.
2
7
u/OldHummer24 Apr 20 '22
Firebase Support is really a shame, yes. It will take some time. Development is a joy at least compared to some other tools.
5
u/realrk95 Apr 20 '22
You’re right, best part is the dev experience. But not only Firebase, even Google maps does not have an official package for desktop. And when building a cross platform app with web support, one needs to create an abstract class that detects the compile target so as to use the correct dependency. Why is Firebase and Maps API not dart native? (It’s not like it’s using many system level api calls)
3
u/OldHummer24 Apr 20 '22
Yes, in this case, Flutter is not the best choice. It's impossible to do everything. For my use case, Flutter was more than perfect. (Cross platform app without sensors etc)
10
u/Secret_Jellyfish320 Apr 20 '22
As the official documentation states:
“Flutter is Google's portable UI toolkit for crafting beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.”
That’s been said, focus on the “UI toolkit” which translates to “We only devolop WIDGETS”!!
All of the platform specific ops does NOT fall under the responsibility parts for flutter, yeah there is a lot of libraries and plugins for that, and even the flutter team developing some of them, but at the end of the day it’s not there job.
I’ve stumbled upon some handy plugins that were in the flutter framework itself like HapticFeedback class, does that mean they are responsible to create some ? No, but still it was nice gesture from them since this is platform specific and UX wise.
Though the development of those plugins is indeed necessary and flutter plugins in the pub lacks a lot, after being in this game for too long I can confidently say: using flutter really fun and effortless, and whatever that I need that is not yet developed can be developed with ease, yeah the community may not be the best for aiding in the process but lord know there are some geniuses out there that can help whenever you are trying start something crafty.
To sum it up, despite all the lacking flutter is still the best choice to go.
5
u/realrk95 Apr 20 '22
They have no obligation to make it sure. But the reason we use it is because they laid the groundwork. What I’m talking about here is Google’s own products, ie. Firebase and Maps.
And if they don’t release the packages, who will? Microsoft? What about notifications? Is it not absolutely critical to almost every app? Notifications are still not available on Windows and Web which are most recently out of beta. Name a single successful app (other than static websites) that doesn’t have notifications
5
u/dancovich Apr 20 '22
When you suggested you're probably going to switch to React + Electron, who do you think developed any of the plugins you'll need to support the features you mentioned? Certainly not Facebook/Meta.
That's the thing, React and other frameworks benefit from being around longer. There is nothing keeping Flutter from having these plugins, the groundwork to create them is certainly there.
But I do understand that in the end of the day, your need doesn't match Flutter right now. Not only you need desktop and web support, you need very good desktop and web support. These platforms are simply too new in Flutter.
1
u/realrk95 Apr 20 '22
Well, Google made the plugins for USB and BLE on web possible by making the necessary changes to chromium. So today, if you’re using chromium based browser or any app based on it, regardless of the framework, you would have access to the APIs (with the exception of iOS that basically forces WebKit).
I’m not asking for everything. Forget bluetooth usb if it’s too much. Just presence of basic stuff like notifications etc is enough.
2
u/Secret_Jellyfish320 Apr 20 '22
I guess dancoich really sum it up when he talked about the real manufacturer of the desired plugins, that made me think that you real question is not about the state of flutter it self rather the state of the open source plugins out there in the pub.
I’ve moved in my career from software development to the chief staff, but I really want to keep the code around so am trying to ask always in public channels what people think is missing as a plugin or a library in the 3rd party libraries of flutter, though not even once someone started to point at something, great you have at least stated that some plugins needs to add some platform support! I guess I can start there by seeing what can I do to help.
1
u/dancovich Apr 20 '22
As u/Secret_Jellyfish320 said, they can certainly do it, but it's not their job.
I would maybe say that Firebase support is Google's responsibility, but on the other hand Firebase isn't the only cloud solution out there. The Amplify project for example is starting to support Flutter for AWS (so far only authentication seems to be supported).
So right now it's just a matter of time.
5
u/Mirovhan Apr 20 '22
Hi there! Been using flutter for cross platform client apps (mobile, web and desktop) with a gcp/firebase backend since 2019. We started with the mobile app and updated it to support web and desktop recently. Never had any kind of performance issue or missing lib for any kinda of hardware we use (and we use many). Yes, we had to open some native android libs for supporting some stuff, but it wasn’t a terrible experience, on the contrary, we learned about native to flutter injection, which is amazing btw.
To be honest, it’s all about a good software architecture, data and entity optimization for cloud firestore, gcp pub/subs and GKE for services. The experience so far has been superior to anything, and the single code base is extremely easy to keep updated thanks to our clean architecture implementation. We even developed our own widget library to keep a single standard for UX/UI. It’s all about using the right tool, for the right work in my opinion.
Answering your question, I believe google has invested a lot on this, considering their next mobile OS will be based in dart, and all the UX/UI will using flutter by default, everything will stabilize in the near future. GCP is a huge money making machine and it’s mobile ecosystem is solid. I’m sure they will keep upgrading flutter and improve it constantly to support all the other infrastructure they have!
2
u/realrk95 Apr 21 '22
I really hope they bring the FlutterFire suite to Windows and Linux. Looking forward to the updates!
1
Apr 22 '22
Hey! What's the name of the app? I'd like to try it out and see how it feels
1
u/Mirovhan Apr 26 '22
Hi, sadly it’s an internal app of the company, it’s used by workers for picking products inside our stores and assigning them to locations in the storage room. It has barcode scanning, rfid and printer compatibility 😎
2
u/Apostezjon Apr 20 '22
I think You got different point of view, flutter as a solution to create mobile apps (android / iOS) is good. Web and desktop is just an "addon" i think, that let You create app, without creating the same code in other language. Google has focus on mobile,and not so long ago, they improved performance a lot on mobile, so i think that the core of the flutter is still on good way, and web / desktop is still an "addon". but that is just my point of view
i am react / vue developer, flutter/ react native developer and backend developer (node/go) - i would never pick flutter for web, or dart for backend - i can, but it is just not solution created for this in my opinion. There is no one language or library to do something better that libraries created for specific reason.
If i can suggest something, i would pick Vue rather than React if i had choice based on my experience :)
Answering Your main question - i would not wait flutter became web library
2
u/realrk95 Apr 21 '22
I’m not waiting for Flutter to become a web library. I know that’s not what they set out to be. All I ask for are the basics that is expected. They have more or less a monopoly on backend as a service and on maps. But they have to put effort in releasing those and other packages on multiple platforms.
21
u/Hixie Apr 20 '22
Battery consumption and performance of Skia also isn’t that good. A flutter app idling consumes significant power.
Like with the web thing, if you have any specific examples of this please do file a bug. An idle Flutter app should not consume any battery at all. It's possible there is a leaking Ticker or something that is causing the screen to update when nothing is changing.
1
u/esDotDev Apr 21 '22
He may be referring to how Flutter can not efficiently paint a small region of the screen like you can do on most native platforms. Any tick at all incurs a substantial cost, often much higher than the actual pixels that are being painted deserve.
For example, the idle performance of a MacOS with a 10x1 px fading cursor, close to 10% CPU or something?
Not using particle Fx, attractors, wind animations, background animations, pulsing buttons are all options, but all of those things are beautiful and fun and its a shame to have to kill them because we can't get a really efficient tick.
1
u/Aggravating_Battle51 Apr 23 '22
there's a widget called RepaintBoundary, check this out https://www.youtube.com/watch?v=cVAGLDuc2xE
1
u/esDotDev Apr 25 '22
Yep, but if you benchmark you'll see it doesn't really make a huge difference generally.
15
u/Hixie Apr 20 '22
No cross platform libraries like Bluetooth, USB and other IO. Some support is there for one or more platforms, but not even a single IO plugin is available that supports all platforms. The devices our company makes can be used via NFC, BLE or USB.
Since your company makes devices that rely on NFC, BLE, and USB, have you considered writing a plugin that exposes NFC, BLE, and USB on all the platforms Flutter supports?
2
Apr 21 '22
This. Even if they went native they’d have to integrate the SDKs anyways. Sure it’s convenient if someone already did it for you, but plug-in wrappers aren’t a big deal to create considering “you’re already saving time” by developing for multiple platforms
1
u/esDotDev Apr 21 '22
A quick look at any of the existing bluetooth libs, the number of bugs that exist, and their general lack of maintenance, seems to indicate otherwise.
1
u/benhaim_tech Apr 21 '22
I have been using flutter since 2018, the development experience is worth everything, and there is more and more package and support for more products with the time, we have a big web app on we using canvaskit and we migrated from react and we enjoying every minute with that.
1
u/realrk95 Apr 21 '22
Dev experience is good, but I don’t agree. We have a few tools built on FastAPI and React (our preferred stack for web) and it is miles better in performance and appearance to Flutter web. It’s good on the surface, but as soon as you start resizing or zooming, it’s limitations appear. So as a standard, we’ve set that if the aspect ratio or dpi changes beyond what we support, an error message is displayed as a workaround.
1
u/KsLiquid Apr 21 '22
I love flutter and use it even in Web for production. However, there are still some basic problems which are filed as bugs but not worked on. They are huge problems in production and make me look bad in front of my clients. I don't mean the obvious limitations like loading time and SEO.
E.g. the browser resizing does not work for web with the canvas Kit, which is a basic functionality every public tool has to provide. Therefore, the canvas Kit is not usable for production, so other things which only work with the canvas Kit aren't either. (e.g. the screenshot-package)
https://github.com/flutter/flutter/issues/77084
Another example: I found a huge bug on mobile safari browser with flutter web. When you enter a text field, the UI has a big error. I opened it up in December 2021, and the flutter team reacted immediately, but there is still no fix planned.
https://github.com/flutter/flutter/issues/95010
Long story short: flutter web has a HUGE potential and the benefits of using the same app for android, iOS and web are wonderful, but there are still important features missing.
1
u/realrk95 Apr 21 '22
Agreed. But given that Web Apps were not the intentional target of the Flutter team, I don’t really mind it. My compilation targets to date remain iOS, Android, Windows and maybe Mac. Web and Linux are of little to no use for my specific cases.
1
3
u/KaiN_SC Apr 20 '22
It runs great on mobile and desktop performance wise
The issue is with libs that are not supported on windows especially auth social providers support.
-3
u/fokken_poes Apr 20 '22
For mobile apps flutter is horribly slow compared to native IMO.
4
u/KaiN_SC Apr 20 '22
Thats just not true.
Building is so nice and you need to know how to split widgets and handle state what most people dont know according to posts in this sub.
2
u/FlappySocks Apr 21 '22
There were some experiments in making flitter web compile to WASM. Not sure if their are still working on it, but it could make a big difference.
2
u/1cedm4n Apr 21 '22
If you are doing web apps, it makes natural sense to stick with web technologies.
If you are doing native, especially mobile apps, the inverse is true. Web technologies have been pushed too far and may have peaked already in terms of performance. Even React created React Native.
The packages that we need will eventually arrive. In one project I still used VueJS because the most basic feature of Firebase still wasnt available. Either we wait with patience or code the feature ourselves, or even hire some freelancer.
Flutter is way too ambitious to target all platforms, including even the web. Some say this will be its downfall. But aim for the stars.. you might not get there, but might still end up on moon.
1
u/svprdga Apr 20 '22
Flutter, like any other technology, has its advantages and disadvantages, has its own use cases; and yours is definetively not one of them because of the reasons you have mentioned. I would recommend you to take a look at Kotlin Multiplatform, I think that it can fit better in your requirements.
1
u/ajonp Apr 21 '22
I think we have seen the web frameworks still succeeding in huge ways. We have Slack, Discord, Notion… for electron based apps that still have great performance. On the web side of the house I think it will be a long time before Flutter gets A11y right.
1
u/Hixie Apr 21 '22
If there are specific issues you're running into with a11y on the web please let me know (bug numbers are the most useful here, so I can make sure they have been triaged correctly), this is an area where we've done a lot of work and while there are certainly some edge cases (like with any platform — accessibility is non-trivial), I'm not aware of major issues.
1
u/ajonp Apr 21 '22 edited Apr 21 '22
There are so many they are probably hard to list. I know Flutter is a huge OSS undertaking, so I am not suggesting anything this size will cover all. One that would be great to fix is
4
u/Hixie Apr 21 '22
That first one is a bit tricky, it's not entirely clear how to implement this on the web. If anyone has any advice for how to implement it, please do leave a comment on the bug. It's something we are looking at, though (as you can see from the recent comments).
Unfortunately because Flutter is basically the first framework to use the web in this way, generating all the pixels ourselves, handling all input, generating the accessibility tree for the whole app, etc, we're finding a lot of corners that the web really wasn't designed to do well. I hope in time lots of frameworks will follow this path, as it really opens the web to a whole new way of doing things. Long term I really hope we can even do away with JavaScript, running things in Wasm directly connecting to the DOM APIs and WebGL and some accessibility APIs and so on, but the web is a long way from that today, sadly.
1
u/ajonp Apr 21 '22
That is really interesting on your stance on getting rid of JavaScript. Is this purely a performance consideration?
I love many things written using WASM, such as Figma. However I have always felt that they should be applications that require heavy compute.
My stance right now is to get back to as much HTML as possible and only use JS when needed. Giving a great user experience with fast FCP and TTI.
2
u/Hixie Apr 21 '22
Performance I guess is the concrete reason, but just from an architectural perspective it's absurd that we are using JS as an intermediate language. If you described what we do today without context as a serious proposal in, like, a compiler class, your professor would probably pull you aside and ask if you needed therapy or something.
1
Apr 22 '22
architectural perspective it's absurd that we are using JS as an intermediate language
why?
1
0
Apr 20 '22
I think Flutter for mobile is great, desktop is good and web is (not yet! except if it’s not a SPA/CSR)
For building web apps it’s still better to use Vue/React etc.
0
Apr 21 '22
Are you building a web application or a desktop application? If you're building a web application go with js, if your're building a desktop application go with flutter. Wanting to build a single codebase that also works well on desktop and the web is very unlikely to work well. Tried running sqlite in the browser for example? There are people doing it, but it's not something I'd want to do.
-4
u/Beautiful-Chain7615 Apr 20 '22 edited Jan 17 '26
exultant smart hobbies fly merciful yoke shy different tap pie
This post was mass deleted and anonymized with Redact
0
Apr 20 '22
[deleted]
3
u/realrk95 Apr 20 '22
It is better than before surely, but why release a buggy mess. They should focus on what can be immediately implemented like Desktop support for native libraries.
0
Apr 20 '22
[deleted]
4
u/Detoxer Apr 20 '22
The fact that they said flutter web is production ready is beyond me.
It would be a lot less crappy if they fixed the boiler-platy, confusing and over-engineered navigator 2.0 more user friendly and intuitive.
1
u/slavap_ Apr 21 '22
What is the problem to use some navigation library? E.g. https://pub.dev/packages/auto_route
0
0
Apr 21 '22
[deleted]
1
u/realrk95 Apr 21 '22
Majority of desktop* users are on Windows and Linux. Of course iOS and Android work perfectly and are in the general majority comparatively.
39
Apr 20 '22
[removed] — view removed comment
13
u/realrk95 Apr 20 '22
Definitely better than Electron. Although I don’t have significant experience with Electron, the setup is a nightmare and the code reusability is not at par (around 50-60%)
4
u/norssk_mann Apr 21 '22
I heard Elektron was horrendous years ago, but that they fixed it. Maybe not so? I just feel that different platforms shine in different ways. Flutter is wonderful as a front end for mobile. I prefer C# and MSSQL to power relational data and APIs. MongoDB for flattened production geo-distributed data. Rails is amazing for web. Everything speaks the same language these days (REST, JSON, etc.) so why not embrace multiple things? There are so many little open source things out there that rock so hard, like Swagger for example. The whole "one platform for everything" just seems impossible. All of the platforms that try it seem to shine in one area and be mediocre or fail in the rest. As long as a platform is well established with great uptake and many contributors, I say give it a whirl. Embrace your muse. Fuck around and find out! That's how you got into this line of work anyway, right?
15
u/smpmlk Apr 20 '22
I mean, what basis is that conclusion on? My company decided to abandon our Flutter desktop entirely in favour of Electron mainly because of poor performance on macOS.
I had an issue describing high memory usage when using TextField, reproducible in a small sample of code, and it was closed because the engine team said it wasn't their problem.
11
u/LudwikTR Apr 20 '22
Interesting. Would you share the ticket in question?
7
u/smpmlk Apr 21 '22
Oops. Yeah sure. https://github.com/flutter/flutter/issues/79050
Honestly, I don't know if the issue still exists in the same form, or why there wasn't more interest in something I provided such simple reproducible steps to see. I've always been conscious of keeping in mind performance optimizations, but this seemed like a blatant issue. The negative effects weren't as apparent on Windows.
9
Apr 20 '22
[removed] — view removed comment
1
u/_Samanik_ Apr 21 '22
you are not wrong.
But it's also important that things like this get out in the open, so they will get focus for the flutter team to fix.
27
u/qualverse Apr 20 '22
Have you seen quick_blue and quick_usb? They seem to support all the platforms.