Flutter 2
developers.googleblog.com
developers.googleblog.com
Just because a project is ambitious doesn't mean we should all jump on board, particularly when similar projects have crashed and burned, and there's really nothing stand-out about Flutter that separates it from prior efforts.
Those were painful days...
If groundbreaking UX is your core competency you need native. Hybrids get you neither the best feel nor the best dev leverage. Hybrids are selling the exact same dream phonegap has. But they let developers distance themselves from the bad rep and claim they're doing something different. Alternatively, at the other end, they get developers to build essentially native apps while pretending to save a lot of time.
At the time, they were making almost all of the same mistakes that Flutter is, and the devs I talked to seemed to be of the opinion that those problems wouldn't be fixed until browsers started adding brand new capabilities specifically for them.
Looking now at the demos at https://www.qt.io/qt-examples-for-webassembly, a lot of the same problems are jumping out at me. A complete lack of accessibility features, poor handling of scroll events, large load times, unfocusable fields, lack of keyboard controls, etc...
Halfway through playing with their pizza app, the page just froze and stopped responding to any clicks at all. Maybe those demos are outdated?
Blazor and Rust are showing a lot of promise here, but from what I know about Qt I'm much less optimistic, because Qt is used to handling everything about rendering itself -- and as Flutter is showing that's just not a good approach to building web GUI frameworks. But (again, purely from what I've seen) trying to layer on a system where Qt is actually interacting with the DOM seems like it would require a somewhat difficult shift in its architecture. Maybe I'm misunderstanding the problem though.
I found that hard to believe. But, clicking that link and trying the pizza demo... Yikes. It's not exaggerated at all.
So no pizza demo for me.
Qt for WebAssembly is available under the GPL3 and the Qt commercial license, though.
I mean... yes? There is a ton of incidental complexity (i.e. unrelated to the business domain) involved in creating nice user experiences. If dev salaries weren’t so high then sure, more companies would probably spend the money to repeat the same work across several platforms, but right now? No way.
That said, I still think I agree that you give up more than you gain by going cross platform, at least for now, but I totally get how companies look at how much it’s costs to hire and says “you know what? I’ll take a cross-platform compromise”
Furthermore users don't care about the technology used to build the application if it works, that's the unfortunate reality.
Heck, Lotus Notes went from being a market leader to an also-ran and user complaints about UX to corporate IT departments definitely played a role in convincing those departments in switching away.
More recently, this also happened with many mobile apps made with cross platform/HTML5 toolkits. They got low review scores and low user engagement across many firms, prompting a switch to native.
I worked for a company where we did iOS release after very 3 android release coz android was 80% users and iOS 20%. Mind you this was a cross platform Iconic/Cordova app. Now think if we did native. iOS users would have to wait even longer
I'm aware of things like the LLVM based C to JS compilers, but they're not really viable for anything non-trivial.
That's why a lot of shops are writing the same logic N times in N languages and frameworks. It can actually be easier than having to target something these wildly different platforms share.
emscripten/WebAssembly is pretty viable.
C/C++ is fine on iOS (at least when interoperating with Obj-C, Swift is trickier).
C/C++ is “doable but really fiddly” on Android, same as web. There’s a compiler toolchain but not much IDE support, and you have to do all the JNI marshaling yourself.
So C/C++ is only barely usable for common cross-platform code, and yet it’s the best option. What other language are you going to use?
It’s kind of ridiculous, but that’s the way it is. Programming languages are all the same in principle, but in practice they don’t interoperate well and they can’t easily be used everywhere.
Unless there are some great new tools I’m not aware of, C on WebAssembly seems about the same as C on Android. You can compile stuff just fine, and run it, but actually connecting it up to any substantial UI written in JS/Java is going to be incredibly tedious.
For a computation library with well-defined inputs and outputs, and that “just works” and doesn’t need any debugging in situ, it makes a lot of sense. But I think business logic by definition is going to need a much richer interaction with the UI, and that’s what makes it hard.
I don't see why you couldn't write your entire business logic, state management, etc. in C or Rust and treat it effectively like a client-side server, but I've never used wasm in that way so I can't speak from experience there. Either way, I can certainly see how that would require some extra effort, and of course it would only really be useful for applications that don't offload most of their work to a server.
With Emscripten, you can embed Javascript source code directly into the C code and then call the embedded JS function from the C side as well as C functions from inside Javascript.
E.g. JS embedded in C code:
https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b...
...called from C:
https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b...
...and a C function:
https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b...
...called from a JS function embedded in the C code:
https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b...
How about debugging? Is it possible to step through a mix of C and JS stack frames?
https://developers.google.com/web/updates/2020/12/webassembl...
The embedded Javascript can be debugged as usual.
In my case I usually debug the platform-agnostic code compiled natively in IDEs like Visual Studio or Xcode, and for the HTML5 specific code (which is just a few hundred lines) traditional "printf-debugging".
After 10 years of Android, while I understand the goal is to force developers not to write unsafe native code, Android team could have already provide better tooling.
However they have always behaved as the NDK was something they had to offer, not something they actually wanted us to use.
...and yet, it's still much better than replicating the same code in different languages just to support different platforms.
The idea that a platform dictates the language to be used for creating applications on that platform has always been ridiculous, just because it was the status quo on the web for a bit over a decade doesn't mean it's a good idea that should be copied :/
Not sure what apps you've built, but usually that business logic is the minority of the codebase. The rest of the stuff is boilerplate, like drawing boxes, describing layouts, handling events, managing state. All this has nothing to do with business logic.
Ideally, I want to write it once that I want a row of buttons what colors they have and what function should be called when the user clicks on it.
I did what you describe and extracted all the logic in a small component I manage and the result was very banal, extremely straight forward code with was essentially "business logic". The 90% rest was building the UI based on it.
It’s not about controversy. It’s just that in most apps, the UI is far more than 10% of the code base.
No, just non-represenative of most apps, who are closer to CRUD than "GPS Navigator".
You then realize that Windows doesn't really offer such a concept as easily. You think about application URLs. That mostly works, but it takes a couple weeks for the Windows team to get it working.
You implement the feature over on Macs as well copying the Win strategy. But a recent Mac OS update causes a bunch of permission popups that mess with another thing. Now you're messing around with that, and your internal users are pissed (cuz they're all on Macbooks).
There is no Linux version, luckily.
I mean... OK, yeah, you still have to deal with platform differences even when using Electron. But you are in the same boat with like.... Slack, Discord, etc etc. You get _all_ that shared knowledge, a unified code base. And in theory you throw any of your engineers at the problem and they can try very hard googling "Electron [issue] windows".
I also bemoan the fact that _even Slack_, with its billions of dollars, didn't feel the need to have a native application. But I do get it, especially when there's a lot of pressure to ship.
------------------------
Google Pay switched to Flutter a few months ago for their flagship mobile app, and they already achieved major gains in productivity and quality.
By unifying the codebase, the team removed feature disparity between platforms and eliminated over half a million lines of code.
Google Pay also reports that their engineers are far more efficient, with a huge reduction in technical debt and unified release processes such as security reviews and experimentation across both iOS and Android.
1) This announcement seems to claim that Flutter 2 apps can be deployed as web apps as well as mobile apps, yet
2) This very morning I received an email from Google stating that pay.google.com is going away and the service can only be used via the mobile app going forward.
I'm not sure about the quality. I'm bullish on Flutter but the iOS reviews for the app are awful.
Nobody needs native UI. It's time we get passed that!
Rinse and repeat for every platform.
That’s what makes the web beautiful: you write the app once and it mostly runs everywhere. You have to figure out the infrastructure I described above once and you’re done.
Or at least that’s how it use to be before the major platform players realized how lucrative it is to charge developers App Store fees.
Yes.
>Is it that hard to find developers who know more than one programming language?
Who said everybody has a team or this luxury?
Someone in our team had a small Android TV app working in 2-3 days with WebSockets, web views, some animations, etc.
Your toy app takes 2 days to create and then you (or worse, someone else) have to support the crummy Visual Basic/PHP/Javascript/Mongo/ColdFusion/insert easy to use crappy tech here, forever.
What kind of an argument is this?
Not wanting to learn all those things for multiple languages is valid. But "it would take a while" doesn't tell you anything about whether a language is crappy.
The odds are pretty close to 50:50 that the language you already know is the crappier one.
Past a certain point, being usable in 2 clicks is a negative signal for overall tech quality. Most of the really solid techs need some extra configuration. The classic example of crappy tech is the DB tech that listens on 0.0.0.0 after installation, with no user + pass or admin/admin.
Yeah, but the post up there said 2-3 days. That's plenty of time to handle those important details that make a project non-instant.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
The Dart implementation seems much slower than the NodeJs implementation and it doesn’t bring anything new to the table? It added null safety today.
Anyone that knows if it has any feature beyond for example what Ocaml has?
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
How programs are written does matter.
What if we can all see implementations that are not wildly different?
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
But the argument here started as "Hey look language A is faster than language B" , while pointing out completely different implementations, which is, absurd.
danielscrubs referenced measurements which showed similar performance for Dart and NodeJS programs, but did not mention that similar performance.
So how different are the "busy" measurements?
To understand actual performance first understand what approaches were used.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
:and:
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Then you add multi-threading, and see a decent improvement, e.g. from 5 seconds to 1.5 seconds on 4 cores (almost all implementations show a similar gain)
And some languages with support for Vector operations further improves this to 0.7s
So this benchmark seems to be not very useful for comparing performance of any decent language. It could however be used for comparing improvements of using different techniques to solve the problem, or to showcase what new features brings to the table.
Saying "any decent language" assumes we know without measurement the very thing that we need to measure.
Showing "very similar performance characteristics" is a valid outcome.
nbody dart 8.44s nodejs 8.37s
regexredux dart 4.89s nodejs 4.79s
Those don't seem much slower.
I look at flutter as a quick way to bootstrap a simple CRUD app, but... for what? How does it improve on the web? Not 100% sure, but I do like the down chain investments that flutter supports like Skia.
I'm a huge fan of canvas, but I recognize its limits for building apps. It's great for many things like games, and it is a 2D escape hatch. I'll admit that I get suckered into the lure of building a 2D canvas empire that is cross platform because it would be nice.
> Desktop
JetBrains Compose.
Going from Kotlin, Swift or TypeScript (let alone more powerful languages) to Dart is like going back to the dark ages without something as basic as algebraic data types.
I suspect you could learn it very quickly.
edit: funny how I can discuss extremely controversial political topics here and never have any of my comments killed, but having a negative opinion about wasm and JS frameworks is just a step too far lol.
- Memory management without GC - Unboxed data structures - SIMD - Shared-memory multi-threading - Precompiled snapshots (does not need to be recompiled on page reload)
JS has atomics and shared memory arrays which also basically bypass garbage collection [1]
JS had working simd.js implementations in both Firefox and Chrome until they were pulled in favor of WASM
[0] https://v8.dev/blog/code-caching-for-devs
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[2] https://github.com/tc39/ecmascript_simd
https://blog.mozilla.org/javascript/2015/03/10/state-of-simd...
The `123|0` type hint is also recognized and implemented by most browsers too. It forces a 31-bit integer on most platforms (and can offer a significant performance boosts if you're running a tight algorithm).
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
I'm not surprised. You probably happen to agree with the majority of HN on these topics so the upvotes outweigh the downvotes.
Tools come and go, they serve a purpose like writing code in a more futuristic style and compiling it down to a broader browser support base. There will always be a treadmill like that in any language. Look at how C++ has evolved from its 90's roots to more modern C++11, 14, and 17 styles--each change also required more work for the tooling, compilers, build systems, etc. to learn. It's just in the C++ world there are far less people working on tools than in the web world.
COBOL is still being updated, it even supports OOP now, yet it shows its age and its joints creak a little, just like JavaScript.
Functional programming is very difficult in those languages due to weird closures, bad lambdas, weird block/proc/lambda rules, etc. async from the ground up means that concurrency story is much better and allows lots of threading (with libuv or whatever low level library handling the difficult parts).
JS used to have less ergonomic syntax, but has benefited from adding it last, so it usually chooses the best version.
Stability of JS is much better. When the implementation is the spec, there are bound to be lots of little breakages. Asa result, there’s not much room for alternative implementations.
Tooling is far better than any other scripting language. Debugging and introspection tools are second to none in the category. All these other languages have broken compatibility so that old software won’t run on new versions. Webpack gets hate, but what other scripting language bundles its output? Babel gets hate, but if Python had something similar, the v2/3 switch would have been no big deal and all the “I can’t use that because REHL doesn’t support that version yet wouldn’t be an issue either. Likewise, minifiers reduce download size, improve performance by removing and simplifying parts of the code and improve parse time, but other scripting languages don’t bother.
Type support via typescript is miles ahead of the competition.
Finally, performance is one or even two orders of magnitude better compared to other scripting languages (luaJIT being a notable exception). In fact, modern JS JITs can come very close to the performance of Java or even C in many cases.
JavaScript isn’t the end all, be all of programming, but it’sa very solid choice with good reasons to like it.
If the scope is programming languages in general, since it was stated that JS isn't a "bad language" after all, then you can include a long, long list of type-safe languages that are much better for dealing with both its role in the browser and in the backend. Elm, Reason, F#, OCaml, Scala, Kotlin, Swift, Rust, Haskell, to name a few.
Most of the languages you mention are as fast or faster than JS. Most of them are also much more niche. Tooling for most of them is lacking. Others drag around a huge ball and chain in the form of the JVM or .NET (even the light versions are generally much bigger than v8).
Reason/ReScript seems mostly abandoned by Facebook at this point. Elm is very deliberately a one-man show (I don't like that bus factor). Ocaml compatibility and tooling seem easy then drop off a cliff in practice. Haskell is way too worried about math and the illusion of purity (and finding people willing to deal with it is very hard). Swift is Apple-only and doesn't actually bring much to the table (honestly, it seems like a rip-off of Dart with tuples and ref counting instead of a GC). Rust is much lower level and writing something in rust will take far longer than in JS.
And hey, it might even become hipster trendy eventually.
Good for games.
It will be hard to overlook little details like this -- and there will be a million tiny details like this -- when decades of browser development have led us to expect a DOM experience that Just Works for UX like that.
A) lags on my work machine when tabbing through fields
B) doesn't handle HDPI screens well (the entire interface looks blurry)
C) keeps fields visually indicated as selected even when I click outside of the browser (if I start typing, is it going to go into the field or not?)
D) has a separate touch mode? Touch doesn't just work?
Looked up another of their sample apps:
A) doesn't respect my OS scroll direction
B) lags on scroll
C) mousing over any of the buttons has a 0.5 second delay before my cursor turns into a hand icon.
And all of these sample apps take about a second to fully load for me, despite the fact that most of them aren't doing anything complicated.
The "we can rebuild the browser in Canvas" idea is alive and well in GUI toolkits, but I have never seen an implementation that didn't have these kinds of basic problems. How many UI toolkits do we need to see that can't figure out how to do scrolling before we acknowledge that having one team try to independently reimplement decades of work on the web might just be a bad idea?
I really appreciate the feedback. We clearly have more work to do on the Web side of Flutter. Unlike the Mobile side which has shipped 100,000s of apps, the Web side may be up to like 1000. :) So many more issues to address as we work closely with more users to get their apps into production.
If you'd like to track progress on any of these, I'd encourage you (or anyone else reading) to please file issues at flutter.dev/support. We read (and try to address) each and every one which comes in via Github.
To an end user, their accessibiliy tools, & user extensions, the page might as well be VNC'ed in to some system. Everything is opaque. There's no HTML elements.
I can not state strongly enough how immoral & unethical this path is. Bending the web to the developers will & breaking all the contracts of what a web page is a grevious act, is enormously harmful. This is one of the worst possible things that could happen to the web. Please for god sake don't do this to us. Don't injure the web like this.
This will be raised again and again and again until the ends of time as an incredible black mark on the name of Flutter.
Edit: constructive feedback welcome. Whether it's me or others, folks pointing out this peril often find themselves hit by downvotes as I do now. This seems like an existential challenge for the web, to keep humans able to be in the loop when browsing the internet. We would all love if you would defend or explain or have something to offer in your critiques about this crisis.
[1] https://flutter.dev/docs/development/tools/web-renderers
But... think of this as new Adobe Flash. Or a new MS Silverlight. Some people use it, mostly for privately hosted local apps. Most people won't.
PS. And then Google will probably kill it anyway
Currently I'm counting four or maybe five different HN users in this thread indicating this affiliation. I appreciate this open look into the organization. We're probably getting a more honest idea about what really goes into the sausage. Still, your PM might be less happy about this thread...
Chris Sells PM, Flutter
I just don't see how Flutter is going to keep pace with "native" web apps when the team is constantly playing catch up every time a new medium, input method, or browser feature comes up.
Handling scroll is hard enough, is this going to handle WebVR? Can I control this web app with a voice assistant?
Sorry if this is something of a dismissive answer, but I'm not sure what the right way is to file an issue that boils down to, "it seems like you picked literally the hardest possible way to build a web GUI toolkit, and I'm very impressed that you have anything that's usable at all, but I also don't understand why you did this."
I don't know, I don't want to be overly negative here, but I don't have any confidence at all about the overall strategy that Flutter is pursuing. In order to get accessibility to work, you're basically going to end up building a DOM representation of these apps anyway. It's just now you have to build a DOM representation and you have to completely reimplement the rendering stack and capture all of my events? How are you going to make something like that performant across every browser?
I want to echo a few other comments I've seen here that this result isn't really surprising to me. I guessed before I clicked on the demos that they probably wouldn't handle scroll events well, because I know how you're building Flutter for the web, and I have never seen any GUI frameworks targeting pure Canvas on the web that don't have basic errors like this. If Flutter ever managed to be the exception, that would be very surprising to me. I don't know what Flutter's internal process looks like, I'm not going to tell you you're building something wrong. I only know what the end result looks like, and I know that end result is not going to radically improve any time soon.
It's not my place to tell any team what to do, and nobody is obligated to care what I think, but... I don't know, the demos online do not leave me feeling confident about Flutter's future. I don't think the experience as it exists today is the result of a bunch of isolated issues/bugs that can be fixed one at a time.
But i don't think this is the real issue here.. Flutter is more of a Flash and GWT lineage, and that's fine if that's what you are looking for.
But i bet on the Web every time, its the most popular UI (and now much more) platform ever. So while some will go through the Flutter and React way of doing things, most will just stick with the web.
The web is the most sophisticated platform ever built. It gives you a lot of power and freedom, so i don't understand why some prefer to get stuck into a cubicle when you have so much space?
Its nice to have frameworks to make things easy and developers more productive, but the ones that do this without alienating the developer from the bigger, broad and sophisticated framework are just better.
Just let them be the new Flash, now at least open and over the web, and look for other approaches if you want to maintain real control and freedom, instead of delegating to the platform developers.
It doesn't really need to have instant parity with "native" web apps at everything. Maybe Flutter is a poor fit if you have extensive native requirements. That's okay.
Currently as a web dev, if I want my website to be usable by a voice assistant, I don't have to do anything. If I want my website to be usable in VR, I don't have to think about it -- that's Chrome's problem, not mine, I just expose the exact same controls I've always used. If someone is building a user agent that interacts with my site in a novel way, as long as I've built my site well everything just kind of works, because of how the web is architectured.
But if you're rebuilding all of the controls from scratch, suddenly you can't think that way anymore. You have to think about the controls and gestures that every medium exposes, or else you have a website that just randomly breaks depending on what OS/platform a user accesses it from.
> and it's usually addressed by allowing native hooks
Not on the web though. I mean, for obvious reasons on the web we can't just expose native OS methods for websites to call. Flutter doesn't have a choice on that front, Google, Mozilla, and Apple realistically aren't going to break browser sandboxing just so the devs have an easier time.
The web is not really adopting hordes of new input modes like WebXR every year, there'll be plenty of time for Flutter to consider new stuff like that before it approaches relevancy in mainstream product development. Accessibility features like voice assistant support don't necessarily come free either. Rich web applications usually don't produce simple/accessible DOM structures even if you're developing with web-native tooling. Flutter or not, accessibility practically always requires some level of manual annotation in web apps, which is Flutter's primary use case.
> Not on the web though. I mean, for obvious reasons on the web we can't just expose native OS methods for websites to call.
I meant native-to-the-web. Flutter's MethodChannels & plugin system works on the web too. If there are browser APIs that you need to use, you can setup hooks to call them from within Flutter.
The difference is that the web efforts aren't being headed by one team in one company, they're a giant effort with a huge amount of funding, shared resources, and attention from multiple companies and communities.
Flutter doesn't have that benefit. It's not that nobody could build a cross-platform replacement for the web, it's that the web was hard to build, and it's very unlikely the Flutter devs are going to be able to repeat that effort on their own.
> Yet Electron and web apps continue to dominate
Largely because Electron piggybacks on existing work by embedding the entire Chromium engine, they're not building an entirely new render engine from scratch. And Electron still struggles trying to keep pace with native systems, even though it's largely just hooking into them instead of rewriting them.
> Accessibility features like voice assistant support don't necessarily come free either. Rich web applications usually don't produce simple/accessible DOM structures even if you're developing with web-native tooling.
The web gives you a lot for free though. It's sort of like comparing OpenGL and Qt. Sure, both require me to be thoughtful as a developer, but one requires me to be a lot more thoughtful.
----
The bigger problem here isn't whether application devs need to think about accessibility, it's for the Flutter dev team. It's that the web doesn't expose the kind of accessibility APIs that a pure Canvas UI needs to recreate all of the accessibility and screenreader support that's built into browsers. Qt on the web has run into the same problem. What you end up doing (because it's the only interface you have to work with) is either trying to on-the-fly maintain part of the DOM and working really hard to figure out which parts need to be maintained, or just flat-out adding a second, hidden DOM tree that screenreaders can interact with. The only way that Flutter can tell a screenreader that a piece of text exists is by making a node and putting it into the DOM.
This is, from what I can see, what Flutter does in its forms. It has a DOM representation of all of the input elements (but interestingly enough not the links or other text, so they're not screenreader accessible at all), and then completely separately, it re-implements the entire browser rendering stack. And the performance is... well, you can see the performance.
Flutter's strategy for handling events to those elements appears to be (for lack of a better term) inverted. It's "Render first, worry about the DOM second", which is not the way that I would try to build something like this. I don't want to read too much into it, maybe I'm misunderstanding their architecture, but the tab errors that people are seeing look to me like they exist because Flutter is trying to poorly reimplement how browsers tab, rather than using an underlying DOM model that could for free signal to them what the currently selected element is. Similarly a lot of the input selection and mouse lag is because it looks like they're doing collision detection in WASM and performing a DOM mutation every time they need to change the mouse cursor into a different shape. Which, yeah, of course that's not performant.
Ideally, a framework like this would target the DOM directly in the first place and use that to drive input, accessibility, and styling wherever possible, adding canvases back in only when necessary to override specific parts of rendering. That's the path that frameworks like Blazer and OpenSilver are trying to go down, which is just a lot more realistic of a goal for an individual team to accomplish.
I'm trying to thread a fine line here, because I haven't read Flutter's source code, so I don't know for certain how they're doing everything or why. I don't want to confidently say they're doing something wrong if I don't have the full picture. But I can see the outcome, which is currently pretty bad, and I can see little bits and pieces of the architecture they're using to get that outcome, which all seem very counterintuitive, overly-complicated, and buggy. I'm happy to be proven wrong in the future, but in the present there's a nearly half-second delay to change my mouse cursor when I hover over an input and none of the links in-app are screenreader accessible, so that's not exactly inspiring optimism. Sure, Flutter could theoretically overcome everything and keep pace with the web, but is that what's currently happening? They're announcing v2 and the web version is basically unusable.
As you mention yourself, Flutter Web already implements some things using the DOM and is clearly capable of doing so, it's just a matter of degree. I can believe that Flutter would benefit a lot from using the DOM more, but that could change any time by some Flutter contributor saying "hm the custom tab ordering impl doesn't work too well, let's render a DOM tree for tabs" or something similar for ARIA attributes, text inputs, etc. It's hardly a fatal or intractable issue with the architecture.
Many of these complaints are real issues that Flutter should tackle but they feel pretty overblown. There's a general tenor that jumps from "there are still many issues" to "what's even the point of Flutter Web if it can't get everything right". Flutter Web has to start somewhere and good desktop browser support (which is hardly unusable) is good enough for many real use cases. I don't think anyone is selling it as a mature second iteration which seems like a misunderstanding of the v2 semantic version which applies to the core framework, not Flutter Web that just left beta. If there's any org I trust to do the difficult work of cross-platform support, it's Google which already provides the lion's share of funding, standards design and implementation development to the web. IIRC Flutter's dev team also has Chrome engineers on it. I expect it to attract the attention of more orgs as it matures and hopefully becomes more popular, the core framework has already received open source contributions from Microsoft and Canonical.
> they're not building an entirely new render engine from scratch
The web platform builds an entirely new render engine from scratch. Native OS platforms give you a lot for free too and you see the exact same complaints about the web's independent behavior proven irrelevant again and again as the web/Electron continue to demonstrate incredible value despite reinventing many wheels.
Well, no, I'm claiming that it is a matter of approach, not just degree. There are two ways you can go about syncing the DOM to your rendering. Tabbing is a good example of that:
A) you can build a DOM tree, listen to a focusin event, and then when an input/link element gets focus, you can update your Canvas to match the state of the DOM. This means that you listen to one event and (with some exceptions) your rendering engine mostly just has to worry about rendering. Or
B) you can build a Canvas, reimplement tabbing, mouse selection, touch events, and everything else... and then when your new implementation decides that focus is changing, you can update the DOM to match your Canvas. In short, you can choose to have the Canvas drive the DOM, rather than having the DOM drive the Canvas.
What I'm arguing is that approach B, which Flutter seems to be using, is fundamentally much, much harder, buggier, and less performant than approach A -- and my evidence for that is that GUI frameworks surrounding Rust, Silverlight, and C# that are following similar approaches to A are almost all much more mature than Flutter is, despite having fewer corporate resources devoted to them. I'm arguing that path B is an high-level architectural decision that is not going to yield performant, high-quality results.
> The web platform builds an entirely new render engine from scratch.
Right, but again, the web platform at this point has spent over 20 years doing that, and for the majority of that time it would not have been realistic to build a project like Electron. A lot of this seems to come down to, "is the Flutter team big enough to handle this". I don't think they are, but maybe I'm wrong.
I mean, we can debate this endlessly, or next year Flutter v3 can start releasing demos that can handle smooth scrolling and don't lag in Firefox. My prediction is that Flutter is not going to turn into a performant, good quality target for the web any time within the next couple of years. But again, maybe I'm wrong, and luckily it will be very easy to verify if I am. I'll check back in January 2022 and see if anything has changed.
The web works as well as it does because (in general) it's accessible by default. There are lots of open problems on the web regarding accessibility, but we should be moving towards being more accessible by default, not less -- because if we want a universally accessible app platform, developers and corporations can not be trusted to make these decisions on their own, and laws will only affect specific industries and countries.
That's part of why Flutter devs talking about dev decisions that can increase accessibility ring kind of hollow to me. Accessibility has to be something that's pushed at a technological and cultural level if we want the web to be a platform that leads the way forward on these issues.
On a web browser, <input> is all you have and because of the abstraction you cannot build it from the scratch using lower events. Think iPhone text selection.
Flutter on web may cater a specific category of graphical intensive apps, but not all apps because <canvas>. It will fall to the same uncanny valley where Java applets where back in 00s.
(parent issue) Tab tabs through text fields only.
A) No lag on my laptop
B) Zooming to 400% reveals pure vectors for text as well as control decorations, even the fingerprint icon. Only the logo becomes pixelated but that one could of course simply be an SVG instead and not Flutter's problem.
C) Yes, this is a common issue with web apps. One often needs to look at web browser focus. I'm unsure if an event is even sent to the page as the page itself loses focus.
D) I think it does and this is just a tech demo for adaptive interfaces if you want them.
A) I'm on Firefox on a Mac Book Pro. My feeling is that should be able to handle a login form, but I mildly suspect that Flutter's dev team is not testing on Firefox at all.
B) Here's what I see when zoomed to 400%. No vectors anywhere, not even for text: https://i.imgur.com/7QFC40v.png Nothing that I see on the page is being handled as an SVG. Very strange to me that you're seeing vector graphics, as that would imply that the form isn't being rendered onto a Canvas for you?
C) This shouldn't be a problem with web apps that use :focus/:active CSS selectors. I understand if a from-scratch webapp doesn't handle focus loss, but I would expect any GUI toolkit to be able to.
D) On the web touch already for the most part just works. There's nothing on this login page that should require a separate interface. I think it's a problem if Flutter only provides adaptive interfaces "if you want them"; in a good GUI framework you should be getting the stuff that the web already handles for free regardless of whether or not you "opt in" to having your site work on an iPad.
The Medium post[1] about Web support explains some adaptations they made for Desktop browser, including:
We also increased the default content density, because mouse pointers support a tighter density than touch devices.
I expect that in a "real" app the default mode is adapted automatically based on the device type.[1] https://medium.com/flutter/flutter-web-support-hits-the-stab...
Works fine on Firefox and Chrome.
I can't experience this problem, for my browser only displays for this site a beautiful, immaculate, plain white page :)
I'm sorry, but if that's the “future of web UIs”, I'd rather stay with the “troglodytes”, who write simple HTML forms with a bit of vanilla scripting here and there.
But a demo site asking to register an account to see the demos? I gave up. It almost like they are not interested to show their demos.
On the other hand you have Native Apps developers, while equally being excited about Cross Platform UI and toolset have been burned more than enough. And this didn't even start with Smartphone. It goes back to earlier PC history with Java or even further. None of them were good enough.
At the same time Native Apps developers dont understand why Web Dev or those who has Web Dev background now working on cross platform toolchain constantly push and produce the same thing years after years.
You cant blame them for being skeptical.
tldr; If I HAD to do cross platform I'd use the following logic to choice one: If I have a team of react JS/TS devs: React Native else if I have a .net team: Xaramin else: Flutter
Then I'd apply for a job writing native apps in Swift/Kotlin and run away ;)
Sadly, a shrinking market day by day.
Ionic 4+ is a complete rewrite from the ground up to use web components.
I use it in a non-traditional way, I do vanilla js + lit-html + web components and it works great.
Performance is smooth, mobile first approach makes responsive apps straightforward.
I don't do any of the native things or command line app creation or any of that.
I've been generally pleased with it.
However, the benefits don't need to stop with cross-platform. By adding location independence to the non-application part of the code, you get the flexibility to decide later (even after the application is written) whether to deploy it as a "fat" app (application logic running locally) or "thin" (UI commands and events routed over network to your app running on a server).
I've been experimenting with these ideas for years and it's all doable. I've done various UI/toolkit implementations such as: Cocoa/ObjC, Gtk/C++, wxWidgets/C++, win32/C++, Delphi VCL/Pascal, HTML/JS, Java Swing, Java SWT, etc.
I look forward to being able to share publicly (once I decide which license to use).
If doing games, Unity.
If I require some native access, Xamarin.
Finally, using C++ in a MVVM approach with native Views for anything else.
Those answers are for personal projects, at work we just do mobile Web, and with Chrome and Chrome Edge teams pushing the agenda of Web APIs =~ ChromeOS, we get to do most of the stuff we care about.
We're close to needing to make this decision and I'm real hesitant to introduce two additional languages (we're already React for the web but haven't build apps yet) vs a React Native app where our team can be immediately productive.
React Native works until it doesn't and then you are getting into very detailed platform specific territory.
A lot of the cross platform promises were untrue - we quickly learned the importance of QAing both builds and frequently had platform specific patches.
Just bite the bullet and go native upfront.
Some examples from the top of my head:
- various performance issues (e.g.: memory leaks which haven't been fixed for years [1])
- their push/pop router navigation seems like a really bad idea
- worse developer experience than using Angular directly (e.g.: last time I checked this, the save/compile/reload cycle of an Ionic project was an order of magnitude slower than the same project without Ionic)
[1] - https://github.com/ionic-team/ionic-framework/issues/19242
My findings at that time (it was a while ago) seem to match exactly the slowdowns described in this issue [1]. Just importing the IonicModule in a new Angular project (without actually using any Ionic component) made the dev server build times jump from around 200 ms to a couple of seconds. And the situation only seemed to get worse as more Ionic features were being added to the app.
Just to make it clear, I understand that this is an open-source project and I don't expect anyone to fix my issues. And I'm also very grateful to you and the Ionic team for giving us Capacitor which is such a big improvement from Cordova.
So I don't like being all negative in here. But I did encounter a fair share of issues with Ionic and I'm only sharing my experience here as just another data-point in case it helps someone make a well-informed decision.
And I have to say, the overwhelmingly positive reaction to Ionic in general did make me question my own abilities several times. Maybe I just don't "get it". I still haven't ruled that out as a possibility.
[1] - https://github.com/ionic-team/ionic-framework/issues/17902
As you say, platform-specific glitches will always crop up so you’ll always need a bit of native work. If you’ve thinned out native development team this can make things hard. Instead of a team of 5 or 10 native developers working on bread-and-butter UI stuff, you only have enough work for 1 or 2, but it’s all grungy stuff like talking to low-level frameworks and working around platform bugs (or React Native bugs, of which there are plenty). That’s not a recipe for clean and maintainable code.
A related issue is that React and React Native aren’t 100% compatible. You can’t just move existing React code directly over as you might elect. It is possible to write code that works on both, but it isn’t trivial.
QA definitely needs to be done separately on each platform.
That agility didn't come for free, however - we gained speed, but also traded routine bugs for exotic ones. In addition to simple null-pointer errors and the like, we got to spend two weeks digging into the Mono runtime to find a locking bug that drained users' batteries. We had our own sqlite wrapper because the built-in ones on Android and iOS had too many incompatibilities. We had our own red-black tree, for some godawful reason. We had a standing weekly call with our Xamarin reps to discuss toolchain bugs.
Ultimately, the pain ended up outweighing the savings of sharing code. At the time Rdio went bankrupt, we had substantially rewritten the apps in Java and Obj-C. RIP.
- I've used Xcode since version 2 and like it, but in my opinion it's a worse developer experience than Flutter. Refactoring and code navigation were much better in both Android Studio and VS Code.
- Flutter's hot reloading is fantastic. Meanwhile, SwiftUI previews seem to be built on the same technology as IBDesignable, that is, they're just barely stable enough for a short WWDC demo.
- I am very sensitive to non-native controls on macOS, but UIKit doesn't even have a standard button class, the first thing that everyone has to reinvent (Apple included). I wouldn't pick Flutter for business apps with loads of text editing, but it feels perfect for social game-ish apps, like QuizUp or Duolingo.
- In my experience (German freelancing market), the typical native app developer does not care about the user experience anymore. Ever since RxJava and Swift have hit the scene, the focus has moved from impressing the user, to one-upping your coworkers with exotic language features and avant-garde architecture patterns. Dart is a dumb language like Go, and I think that's exactly what's needed to bring UX back into the spotlight.
I agree with most of your comment, but the only thing I'd add is that from what I've seen if your concern is the quality of apps then Flutter definitely is not where you'll go to find that. If anything, Flutter developers seem to care even less about the end-user experience and instead simply focus on their own productivity. The end results are often horrible with a ton of jank, UI weirdness, etc.
Doesn't anyone else use UIButton? Granted, the native iOS app I developed was intended primarily for blind people, so I didn't really make it visually polished.
Dart literally has reactivity build in, like RxJava or RxSwift. You have no idea what you're talking about.
This is a mantra on HN. But is it true? I don’t think it is if you’re trying to build a big product mainstream people will use.
People want native apps. No one needs the apps to work in 25 years. The web is just part of the picture, an important part, but still just a part.
Which platform did Clubhouse build out first? Why?
The web is for everyone--I can go to an internet cafe in a slum and browse and buy from the same Amazon.com as I can from inside a $15M mansion. It's a quantum leap in access to the world using the web.
Anyway, I do still wonder: if FAANG had to pick between native and web apps, which do you think would they pick?
Facebook could have shut down their Website and it wouldn't even have a 10% revenue impact.
A: web, for sure. That's how they make their money.
A: I wonder how much money they would lose if they shut down their website? Would they sell their stuff on A instead?
N: Who cares, it's only there to make the acronym nicer.
G: Web.
https://docs.microsoft.com/en-us/microsoft-edge/progressive-...
Today, 10 years later, I say Web.
But I think betting on the web actually meant to bet on native for each respective platform. Bet on native for the web is betting on HTML/CSS/JavaScript. And then have a Java/Kotlin version for Android. And have a Swift/Objective C version for iOS
I think the learning is, write once run everywhere is what has been tried and failed time and time again for user applications. Java failed many times, Silverlight, Flash, etc.
The reason is always the same, user experience is limited when you go that route, and it eventually loses out to competitors who offer the better user experience on the user's platform of choice.
Advertising accounts for 99.9% of Facebook revenue, with mobile advertising accounting for 94% [1]
Not sure for the other ones.
Except 70% of e-commerce, 90%+ of Social Media are now on Mobile Apps, where they were all previously 100% Web.
The problem with Tech industry is that too much thinking is about centralised, decentralised, Technology with backend front end. etc. When its users or customers dont give a fuss at all.
We'll have to see how long this approach will stand up for, both legally and technically. With real open source phones and antitrust developments we might see a revival of mobile web eventually.
Web is still great for Discovery though.
Sadly, the capabilities of PWAs are very much second class on every mobile platform right now. But I don't think it will stay that way forever.
I'll take a well done web page anytime over a native app.
That is an oxymoron.
Only because OS vendors made them believe that.
It's not, and can't be. There's literally no implementation of DOM that can be fast. There's literally no conceivable implementation of the current Web that can do, for example, fast animation on a list of elements without horrible hacks (like cloning elements, taking them out of the layout, hiding the original elements and then animating the new elements).
> It will never be as fast as native, but if you think that it needs to be then you are missing the point.
And what point would that be in the context of "If OS vendors wanted web-apps to succeed, they could have done a lot more"?
Blanket statements don’t work.
Secure Shell[1] is actually my go-to terminal for daily use, and supports some features that are important to me (e.g. OSC 52 codes) that GNOME Terminal doesn’t.
[1] https://chrome.google.com/webstore/detail/secure-shell/iodih...
I would argue that people want a certain quality experience. They don't care about whether the developer used Swift or Javascript or OCaml to deliver it.
The Web does usually deliver a certain baseline experience, and most platforms actually deliver a browser which mostly matches platform experience.
For native apps, there is a wide variety of things which you may or may not be able to do based on what the developers implemented and whatever their chosen toolkit supports - including toolkits which reimplement their own drawing, widget and event systems and does not support accessibility or even consistent copy/paste.
For web apps, you do have to somewhat actively have to break this stuff as a developer.
Wanting / Loving something to succeed is one thing. Whether it will actually work or succeed is an entirely different matter.
I guess I would like to think we are betting on the web. :) All of the Flutter founders came from Web backgrounds. After years of attempting to make the Mobile web awesome, we forked Chrome and built a new thing. Now we're bringing it back to the Web.
The web is a big tent. I think there is a lot of room for innovation here. We're attempting with Flutter to push on some of the newer aspects of the Web. There are still some pieces missing from the Web to make things like Flutter really shine (e.g. a multi-line text measurement API could help get rid of a ton of code in Flutter Web). As you saw in the keyonte today, we're working with Chrome to continue to improve life for developers.
I don't think Flutter will ever be the right solution for all of the Web. Certainly not today. For example, we don't even support SEO or great indexability yet (although it's long been planned for and will be coming soon).
I just want to believe we can do better. We, developers, can all push development (including the web) to be better. Hopefully Flutter will do it's part.
Can you give more info on that ?
Another question i’ve always had about flutter : last time i explained how this tech looked promising, a friend asked me about performance. I said « they said it’s really good and smooth ». But then we tried the iOS demo app (something very basic about vegetables) from the app store, and the scrolling performance was a total disaster (on an iphone x).
Do you have an explanation for the discrepancy between the official ad one can read on google blogs, and the real-world experience of app developped with flutter ?
For what it's worth, people had the exact same mantra about internal combustions engines for decades any time someone brought up electric cars.
You're absolutely right that entrenched systems are hard to change and attempts to change them mostly fail... until one succeeds.
Worth remembering that this is not the first or even second attempt at this from Google. So I think people are fair when they are not just jumping along all happily as people have been burned before.
JavaScript, with all its many many warts, is widely supported, incredibly popular, and not going anywhere.
I'm not about to waste my limited weekend time learning Flutter 2, knowing it's going to be in the trash bin by 2023. I'd rather suffer through some more JS warts and get better at avoiding them.
Google's history on this sort of thing isn't good but this will be much more stable than their other offerings. Dart is the primary language of the ads (i.e. money making) side of Google and Flutter is their best shot at making the language relevant elsewhere. I'm still not in a hurry to learn it but I'd be very surprised if it's in the trash bin within 5 years.
They're still updating GWT, so I'm not sure what you me by that.
But if you want to make apps that feel actually native on their platforms, React has it handily beat. It’s a better fundamental model, that even with a slower language and runtime feels better in the end by far.
But. They. Won't.
Can you think of a "minor Google property" that is open source?
What you're trying to create is the same spark in your users as PHP and React did to the web. The "oh wow I could do...." that while technically possible before the product existed, is completely re-framed by relatively minor improvements to the DX. You want to inspire an entire generation that may have passed on mobile and cross platform app development due to the verbosity and pitfalls of the iOS and Android ecosystems.
I think a killer app example is the ticket to do this. It may not be the only way, you could blow a huge marketing budget, you could convince another large tech company to do it, but doing it yourself is probably the quickest (or only way) to get it done.
I would not call the flutter SDK and component framework "beautiful" nor would I ever add the adjective "very". I have actually found it to be very verbose compared to alternatives I've used in the past. In some ways I suggest it is over engineered.
> offers a far better programming language than js could ever be
Dart is a bit of an odd duck language to me. I think of interesting ideas like the cascade notation (using .. to do sequences of operations on the same object).
Perhaps it is due to having worked a lot in Typescript and having my brain molded to code that fits that shape but Dart feels clunky in comparison. I can't put my finger on why, but defining and instantiating classes feels so heavy compared to the functional type code most Typescript seems to become. In Dart, I just feel like I'm creating massively indented component definitions with tons of properties and nested classes. Maybe I'm just finally accepting OOP and deep type hierarchies are things I want to leave to my past. I feel I can do 99% of what those things did with Algebraic types and functional composition. Nowadays I prefer that style and going back to heavy OOP feels bad.
With the dominance of classes, massive type hierarchies and quirky syntax - I'd just prefer to be working with a more react-ish framework in a language like Typescript. My feeling is Dart is a step in the wrong direction.
Is it though? Canvas is basically invisible for anything that doesn't have functioning eyeballs (which include not only screen readers, but also mundane things like your browser's ctrl+f functionality, google's crawler and siri). You know how people complain about some SPAs' back buttons and scrolling being terrible? I feel like this "next gen" tech is just gonna be more of the same excellent-in-some-aspect-but-completely-subpar-in-others stuff.
Flutter is not better or easier than SwiftUI. Especially in accessibility or native performance.
No, it's not. It's easier to start with, which is infinitely different from "easier to use". Once you get of beginners phase you see that native toolkits are equipped with battle tested solutions unlike Flutter.
With SwiftUI and Compose there's literally no upsides to Flutter except portability and even that Compose has potential to snatch.
All of these things, more or less, already exist in great variety in the JS ecosystem (angular, react, vue, redux, webpack, etc.). Many people have also already adopted other languages such as TypeScript, which is easier to learn for someone coming from JS, and superior to Dart imo.
from pay.google.com
> Starting April 5, you won't be able to use pay.google.com to send and receive money from other people. To send and receive money, use the new Google Pay app.
We were also not satisfied with the performance of the initial GPay release. We've been working with the GPay team the last couple months and have made significant improvements within both Flutter and the GPay app. Hopefully the next release of GPay will be out soon and others will be able to see the progress we're continuing to make with the team.
Not related to Flutter but Google in general: I recently hit a hard-to-reproduce bug with Jetpack's LiveData for which there's already an open issue created by a third-party developer. I don't recall but it had been open since 2018 with no updates whatsoever from Google engineers on its progress.
And therein lies a frustrating problem for engineers not working at Google but using Google tech. There is simply no alternate universe where a third-party team gets the level of access the way you described the Google Pay team did.
Of course, it helps that the stakeholders are in the same company, but my point is, shouldn't there be a Flutter Foundation where every developer can feel at home on equal footing with other Googlers? Flutter is so promising, and yet, at the same time, I don't want to end up being slave to its complexities with no way out as a third-party small development shop.
Despite that, I'm 99% porting my cross-platform app to Flutter after strong reviews from other developers I know.
We don't have an official foundation, but we are already operating more or less as openly as we would if we did. We have contributions from lots of companies and volunteers; the majority of the people who have contributor access in fact aren't from the Google Flutter team.
For example, try going to a TextField widget and use go-to-definition view the source source code. You can go very far down the go-to-definition hole. Even to the point where you can see where the blinking cursor is being rendered.
For several "blockers" we did have, we were able to copy/paste the Flutter implementations, rename them, and modify them to fit our own needs.
It had to do with their Invalidation tracker (a table, I believe, which is a living log of ordered updates that need to be delivered to observers).
It brings my late 2016 MBP to a crawl if I am building on iOS simulator.
After reading online about it being related to Metal, and needing to switch flutter channels, trying that, and still seeing no success... I just gave up on Flutter (for now).
Maybe Flutter 2 has resolved this?
I would love to learn more about your experience. Would you be willing to file an issue and either post it here or CC me on it?
flutter.dev/support
FWIW, I was also using Rive animations in my app.
So seriously, how can you reassure any indie dev not getting VIP support to optimize their app for laggyness, that they can easily produce a decently performant app?
Could you elaborate on some types of applications which wouldn't or would be a good fit for Flutter at the moment?
There's a lot of comments and links to applications both working and non-working; but I don't really have a good gauge as to what works and doesn't.
> Google Pay switched to Flutter a few months ago for their flagship mobile app, and they already achieved major gains in productivity and quality.
And then, the reality:
> We were also not satisfied with the performance of the initial GPay release.
Ah, the classic false advertisement.
Let me re-write the ad for you:
> Thanks to several-months-long involvement of Flutter's development we could finally fix some of the issues plaguing our app that we re-wrote in Flutter. We're still not close to the release, and we only hope it will be better.
Hi, I audited the performance of the GPay app. Almost all of the performance issues in GPay are related to its use of vector graphics libraries which make Skia spawn many new shaders that have to get compiled. The suggestion was given to move to raster graphics but since GPay ships in many locations that are sensitive to app size, like India, they made the tradeoff to keep raster graphics.
That said there are some longer term initiatives to address this problem on Flutter's side and Skia's side since the problem can show up outside of vector graphics, it's just more unlikely.
> Flutter 2 supports web now!
> We've re-written GPay in Flutter 2!
> We're dropping support for using GPay on the web...
"Didn't you simply delete the website?"
"Yeah, what of it?"
After April 5, I will have to use the app so that I can get back functionality that I once had on the web.
Flutter as a framework is not the worst but far from best, it's very OO while trying to use reacts vdom model which just wants to be functional.
The biggest limitation of the platform is Dart - it's a horrible language that should have died once TS and ES6 became mature enough. And I've used dart back when it was supposed to be a JS killer shipped with browsers, used dartium to build a MVP for an app using Angular Dart durgin the betas.
Back then Dart was miles ahead in terms of tooling and JS the language didn't even have async/await - so I was singing it's praises. But the language stagnated and it's fundamentals with a nominal type system and a closed object model make the language so inflexible and full of boilerplate it's incredible. It's very much like Java (the language, without the powerful ecosystem) and people prefer Kotlin for frontend for a reason. C# is similar but they figured out that they need to build a lot of things in to the language to reduce the boilerplate so they are adding stuff like Records and pattern matching.
If you look at state management patterns in flutter there's probably 5-10 competing approaches all lacking in their own way and all severely hampered by how unexpressive dart is. Or how you deal with serialisation/immutability/etc.
This reminds me, I'm getting the impression that with every new UI framework that gets released, we're just recycling ideas learnt on the web and re-living its paradigm shifts:
1. First, in the early days of the web, we defined UIs declaratively but mixed structure and looks (`<h1><font face="Comic Sans MS">Hello, world!</font></h1>`).
2. Then we separated content structure (HTML) and styles (CSS) (or even XML and XSLT)
3. Later on we added dynamics and discovered event handlers (JS)
4. Then we realized we could use JS for everything (content, styles, dynamics) and imperatively create & manipulate UIs by manipulating the DOM (document.createElement, jQuery, d3).
5. Finally it dawned on us: That's not a good idea, either, because 1) we're mixing business logic and styling and 2) the DOM is global state. So we switched back to the now classic separation of using HTML for content, CSS for styles and JS for dynamics. But this time we try to keep individual components (their state, their DOM and their business logic) neatly encapsulated (React, Angular, Web Components).
Small nit but Jetpack is the name of the entire suite of libraries that Google offers for Android. The thing formally known as "support lib", a name that stopped making sense when it had random useful stuff not just compat stuff.
You're talking about Compose here (or Jetpack Compose).
Unfortunately because of harmful politics from mozilla pushing the NIH webassembly, it's not going to happen before a proponent come (maybe Microsoft someday)
But im sure that with enough work a Rust Sdk could be created as most of the core functionality is exposed as a C interface.
The product i'm finishing is more of a answer to the question of if there's something between the browsers and mobile application platforms that could also work in a more distributed fashion.
The access to DOM apis are going over the C, so its just a matter of wrapping all up in the target language.
Im using the Chrome multi-process architecture, but instead of a renderer process what gets called is a application executable that binds to Webkit and acts as the renderer process do to Chrome now.
So this gives the application much more control over the client rendering, hooking over every event WebKit triggers, something that is not even possible with Javascript now. So its much more powerful.
You also have a "service" process which runs as a service, that is actually the one that receive every request and can launch the application process or do something else.
The requests are over GRPC, so the service process serve not only the UI requests for routes but also the RPC method calls to the API it defined according to what the app does. The API for both are in Swift, but the core runtime and system is on C++ and in a multi-process architecture, so any native app that can compile into a standalone binary and interface with a C api can also use the facilities.
The applications and resource distributions are over torrent so anyone can serve the application without any intermediaries or shipping on servers.
If a app want to talk to the cloud, its just a matter of doing so when processing the routes or the RPC method calls, but it can work offline or eventually online/offline given its design.
I've heard Kotlin can produce standalone binaries, so that means its possible (and no WebASM shenanigans with direct access to Webkit and with the real native boost)
Unfortunately i cannot ship with another SDK right now because i'm doing too much already, but i intend to create interfaces for other languages once things are more stable, and people understand better what is it's place in the game.
But is more a application and window manager as Chrome is more-less and less as Electron or Flutter, where it wraps a standalone app.
With this design together with the RPC api's exposed by each application, you end forming a local network of apps, where they can work with each-other. And with the Api's working as a social contract, you can replace the application to serve the same things without losing everything (effectively real data ownership)
But my goal is that you can just call "./pacman" and the thing pops, even being managed by a core process as in chrome. The user dont need to deal or know anything about it.
Dart is a worst of all worlds - languagee designed by VM engineers in a Java shop
I tested this Flutter example[1], on a 16" MBP with and i7, and it is janky as it can get, it feels like I'm using a 15 year old computer. From the code it looks like the whole thing is... rendered on canvas? I'll pass.
The whole thing feels like Adobe Flex in 2010. It solves a great deal of problems that the web had but introduced a plethora of others.
Still relatively early days for Flutter Web, so I would not be shocked if it's not buttery everywhere. However, we would certainly love to learn more. fluter.dev/support has links as to how to file an issue if you're interested.
https://flutterplasma.dev/ is one demo to try. We expect to be updating flutter.dev/web and flutter.dev/showcase to update more over time.
Edit: You may want to add the NVDA open-source screen reader for Windows to your list. And when you test with a screen reader, make sure you use it the way an actual user would when browsing the web, e.g. using NVDA's browse mode with the arrow keys to move through the page.
They're completely unusable in Firefox. For example, it only scrolls 3 pixels per rotation of the scroll wheel on Windows 10
Which year is this ?
"Buttery smooth animations and scrolling" will be a great selling point for flutter ..if it actually works.
(Firefox)
Here's a hard question, why is this surprising to you? What are you missing in development--is this a gap in testing? Are you hamstrung without support internally to bake this as long as it needs? Rather than double-down on extolling the virtues here, it's time to double-down on fixing the team and the product.
It's... It's very easy to learn more for yourself.
- Ask your company to provide you with a MacBook Air (not the M1, a regular one) or a mid-tier PC
- Use any browser other than Chrome (and other thank Blink-based browsers)
- Go and use the very same demos you so proudly present
Boom. Learning.
I hate to be critical - I'm sure a lot of work has gone into this - but there's still lots of room for improvement too.
Not up to the speed of well-written Javascript, but definitely viable.
In contrast, this is completely unusable on other browsers or on lower powered devices.
On Firefox desktop, initial loading brings a "This page seems to be stuck" prompt. Once it finally loads, clicking the play button just does nothing.
Please note that for 80+% of websites/apps, Firefox is faster or on par with Chrome for me. Google products and some other exceptions are the only ones that are consistently slow on Firefox. Whether that's intentional or just a lack of testing, I can't say.
Similarly unusable on Safari.
On lower powered devices this just freezes Chrome for me.
As I mentioned in other comments, I like Flutter, but Flutter Web is not anywhere close to being viable for production use.
> production ready
Pick one.
That isn't a counterpoint to say the language might be worth considering. That's an additional data point to give me reasons to not use it yet.
Please look at the Source (in chrome) to compare.
Uncaught ReferenceError: WebAssembly is not defined
and it includes what you mentioned, unpkg.com/canvaskit-wasm@0.24.0/bin/canvaskit.js:150Works great in Chrome though, what a surprise!
You can see the difference in the example on MDN as well: https://developer.mozilla.org/en-US/docs/Web/API/Element/whe...
The scaling there works with very different speeds in Firefox and Chrome because both disagree on what value the delta should have. Scrolling up once yields -100 in Edgeium for me and -3 in Firefox.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
I don’t think it’s an issue with Safari.
Ironically computers 15-20 years ago with native software ran much, much much faster and snappier. KDE3, XFCE, even Windows 98SE and XP were much faster. They were crippled by disk I/O, true, but once the software loaded, the feedback was inmediate.
note that heap+haxe is pretty much "the same" as flutter/dart - a language, a compiler and a runtime + a rendering engine..
(a) is so, so big. It is a big part of the reason that Rust, a genuinely difficult language, feels inviting. The Flutter community is small, but the core tooling (all from Google of course) is at least consistent. It's obviously how to include packages, it's obvious how to develop, how to run. No need for figuring out Babel or includes or Webpack, or whatever people use these days.
(b) is really nice because it allows you to get started. Yes, it's true that the experience on one platform (web) doesn't seem that good, it's the "new Flash" etc. But for someone wanting to develop high quality desktop apps, this is it, folks. It works. It's not hobbled or just a tech demo, the scaffolding is there. Will you have to write custom components? Maybe. But as a programmer I don't want to think about packaging and compilation and inconsistencies; I want incompatible code to be sandboxed and clear (i.e. filesystem access or sound). The runtime should be the same.
It was also encouraging to know that if I ever wanted to branch out and deploy my app to the desktop on Windows, MacOS or Linux, that I would have that choice very soon.
And I'm a long-time pure web guy who prefers mobile-responsive web apps most of the time! But if you're going to deploy native and don't have the budget for writing code for every platform, Flutter to me is a lot easier than the other toolkits out there.
I can see it being useful for games and similar where there isn't really any UI but even then I would want dialogs and similar to use regular text that I can copy.
I am definitely not looking forward to flutter on the web. I foresee a lot of websites that I will need to avoid.
The only thing I do get is that you’d want open in new tab and copyable links. However, that’s hard from a developer perspective as you have to make sure you create links that store all data needed to rebuild the same UI in the same “conceptual” context but a different underlying data context (logged in user may be different, data may have changed so some saved context has become stale). You’ll likely end up spending an awful lot of time to cater for all the unexpected things that may happen when someone just clicks a link copied from the address bar or a link by another user 2 days before, that may have been the result of that second user clicking through 10 levels deep in your app with all sorts of filters and options based on the state of data at that exact time two days before the first user clicks the link. Obviously you can’t show them the data from two days ago, but what if the data is still there but the path to get there is different? Does it conceptually still make sense to show the data and perhaps some breadcrumbs showing the new path? Or should you just say sorry that data isn’t here anymore? That depends entirely on what the data is and what you’re users are trying to do, so you can’t build one-size-fits-all technical solutions for this (if that were even possible). How are you ever going to reliably rebuild the UI and context that the first user intended to share by copying the link without spending huge amounts of time? That requires actual business logic and functional design.
For a lot of apps, it may make more sense to just have a share button in some places where you actually and intentionally support this (and where it will be actually used by a substantial number of users). Less time spent on developing things that are hugely complex and very little used (on average per state for ALL your different UI states that you have links to somewhere in the app, even if it’s a typical line-of-business master-detail form with some filters for the master list and a details segment with a dialog box or expanded element showing additional details of a certain property).
No, there are a few exceptions, but mostly yes. And I'm sure more than just the exceptions will use Flutter which is why I'm not looking forward to it.
> How many times have you wanted to save an image or copy text from a UI element in a native app?
Often. I mean not necessarily from a UI element but a lot of the time I want to get an image from a native app and can't.
> How many times have you been frustrated in a web app that when you search using the browser you are getting results from UI elements or “app chrome” instead of the actual content that the web app is displaying?
Almost never. There are rarely many extra results. In fact I already am bothered far more often when websites hijack Ctrl-F (I do not understand why browsers allow this) and fail to search the entire page. With flutter this will become the norm and I am not looking forward to it.
> Isn’t it enough to have some fields with content a user actually would want to copy/search
No, it isn't. I regularly copy things that people didn't expect. If it is just to send someone instructions how to use the app. In fact Android has automatic copy based on OCR from the app switcher and I use that a couple of times a day. There is already too much uncopyable text around. For example all messaging apps on android appear to only support copying the full message. This is what happens when you let people mess with standard UX patterns, they break them!
> You’ll likely end up spending an awful lot of time to cater for all the unexpected things that may happen when someone just clicks a link copied from the address bar
Good! I love apps with great links. It makes them so much easier to use. I don't need to go through their custom navigation to get to my favourite pages. I can use the browser navigation that I already know and love. Also I can share links to my friends! Maybe I can help people use the app better!
You just described a bunch of problems that I already have! Especially on mobile devices. This is why I hope that Flutter on web doesn't take off. We will be making all of those annoyances more common! You seem to think that you can predict all of my use cases and provide the share button manually right when I need it. However product developers on a time crunch often miss or skip use cases so it is much better to have supported by default (like text find/copy that can be disabled) than hope that a developer will think, and find time, to implement them. And if URLs encourage people to make it possible to save and share the state of their app then I think that is a good thing!
Now I'm thinking of all the ways I could get screwed here.
* Not being able to copy transactions from my bank account
* Not being able to easily send text to a read-later service (not sure if this necessarily depends on selectable text, but who knows, maybe selectable means the text isn't visible to these services now)
* Not being able to easily copy something that needs entering into another page
This reminds of sites that try really hard to NOT allow password managers, or even allowing pasting of text into form fields.
Pass.
Web: defaults to selectable
Flutter on Web: defaults to Flutter, not Web
Most of the time a dev isn't thinking "I'd better make this selectable," because they simply aren't going to think of all the reasons someone might select text. They'll think of the obvious-to-them cases, and leave all the other text as unselectable.
It's like if you made spoiler 50/50. Do you want to see this without clicking?
I think we really overlook the thought that had gone into making js, and other open tech.
I truly think my random clicking on paragraphs that I'm approaching isn't just ADHD but a way of helping my eyes stay on track. It's very disconcerting when the text doesn't select. (As, clearly, all these comments noticed as well -- why were we all trying to select the text? To check if it's Flash-ish, of course, but also we just like things to grab onto while we read.)
Or even translating...
Try putting their demo website in Google Translate or even try to select the text on an email in their demo webmail app to copy paste it in google translate ....
Most users don't open devtools to workaround this (Safari doesn't even enable devtools by default). While it's annoying when developers get it wrong (put "user-select: none" on things that should be selectable), this changes very little for the vast majority of web users.
"This thing that will noticeably make your web experience worse won't affect John over there, so why are you complaining" is not the best response.
I like to be able to override developer decisions about what text is and isn't selectable, and Flutter basically makes that impossible.
I'm looking over this thread, nobody has said that they're in a majority. We're just saying that Flutter's default behavior is bad for us, and that it encourages developers to make bad choices about text, and that it's pretty demonstrable that the average Flutter app has less selectable text than the average web app in general.
The fact that many companies will not care about this when weighing the technology is exactly why we're complaining. Because we don't want the web to suddenly become unusable for us just because we're in a minority of users.
It still doesn't make me feel any better or make me any less likely to complain to hear that my problems don't affect everyone else. It's not addressing the criticism, or explaining why I shouldn't be upset about Flutter's decision, or explaining why the current situation on the web is equivalent. It's just a polite way of saying, "yes this will affect you, but we don't care because we don't think you can do anything about it."
And yeah, it's probably true that this issue in specific is not going to cause Flutter to fail (there are plenty of other problems with Flutter on the web that will do that), but does that fact change anything about whether or not widespread Flutter adoption would make my web experience worse?
I know Flutter is working on accessibility, but they have already made choices that are counter to the default expectations web users have. And are having to work to fix the accessibility issues they introduced by not adhering to web standards and/or best practices to begin with.
Don't want to restart the entire thread that already existed, but I rarely check comments and just saw this.
https://api.flutter.dev/flutter/material/SelectableText-clas...
Seems like every dev using Flutter for more than a few days would know that both `Text` and `SelectableText` exist and pick the one that's relevant to whatever kind of text they're adding. At that point, it's the dev's fault for making a conscious decision to make text selectable or not (if they choose wrong); not really the language's.
Not only is this making it easy for app developers to do the wrong thing ("I will just put some text here and make it unselectable, that is going to be great UX") but even worse, it is the default?
There are going to be some unintended consequences here, I suspect.
This reminds me of those websites that use javascript to preventing pasting into password fields "because security", thus breaking everyone's password managers, and making everyone less secure in the process ("if I have to type in that password every time, I'd better choose something simple I can remember...").
So, what about accessibility? If the text is not accessible, how are screen readers going to work?Vision impaired people are just going to have to ... do what, exactly? Will they have to apply OCR to access the content of a Flutter app?
This really reminds me of what was so sucky about Flash. I guess we'll get lots of little walled gardens that make basic interaction via text deliberately difficult. This feels like the opposite of the open web.
This feedback you get here will only get worse with time, and it will block adoption.
If the goal of the environment is to provide a new standard for cross-platform development, your default behaviors are extremely important decisions.
(Disclaimer: I work for Google but not related to Flutter.)
However I think the decision to make text selection opt-in makes sense from the context of an application that targets web.
For example, if you open up your mail app or Slack, you will find that a lot of text on the screen isn't selectable. For example, you can't select the text of the tabs on your browser.
If all text was selectable by default for an app, it may cause unexpected results rather than having the develop opt-in to deciding what is selectable. We have many widgets in our app that we wouldn't want selectable for UX reasons.
In practice, it hasn't been much effort for us to make things selectable. Just need to replace a Text widget with a SelectableText widget.
Isn't this a feature? Having text easy to copy and paste is a copyright problem for many sites. Same with being able to save full-resolution images. It's pretty common to see a copy/paste in forum comments to get around a paywall.
IMO either this or some other webassembly view is the future, simply because it's great DRM. Sure, you can circumvent it, but most people cannot.
I should make my position more clear: I hate this stuff with a passion. But, big business wants better content protection, and big money always gets what it wants - very few exceptions there. I wish we could do something as technologists who want to keep these features of the web; but against trillion dollar companies I know who I'd bet for...
Now, out of the many considerations we had, in this process, "cannot copy the text" is... well, I have no idea what you are talking about. Are you referring to not being able to do this in a EditableText widget, and if so, have to tried a `TextField` with `enableInteractiveSelection: true`?
I mean, there should be hugely more important development concerns when evaluating these things, than... a brief rejection based on something as trivial as that. Then again, I won't presume to know your situation or the criteria you had. But it does strike me as a bit... shallow reasoning.
I can say, that for our case, the dependency hell that you more easily get with React Native was what put me off completely.
> Yup. I would also like to open links in new tabs, view images, copy links, search on page, use browser extensions...
Throwing away all platform conventions is a very heavy-handed and user-unfriendly way of bringing about portability.
Another triviality, for example is the behaviour of scroll chaining as compared to my browser: In Flutter, as soon as the inner scrollable hits its boundary, the outer scrollable takes over, while the expected behaviour for me would be for the outer scroll to not move until I reposition the mouse.
It's exactly the same as Microsoft's Windows 8 fiasco, by unifying the experience across platforms every one of them felt broken and contrived, and this effect is even more notable if your application deals with a more diverse user-platform ecosystem. Your app will be the odd one out that works strangely compared to everything else in every system.
However, I believe "this is a website" or "this is an app" is a perspective the user will take, despite what our intentions as creators were, and so, the safest bet would always be assume what is the norm for the platform, since the user would never be "disappointed" by that even if they expected an app-like feel. On the Web, (at least some, in my anecdata most) people expect to see Websites, even if highly interactive ones.
I have not tested Flutter in a mobile application so I wouldn't be able to tell if it feels par to the course with other mobile applications, so it might be viable if you only need "Android<>iOS" portability.
I'm also not entirely convince that native apps with flutter is a good thing, especially considering that I'll be just another attempt at providing an opinionated UX stack that is completely different from that of the native experience.
So, maybe we agreed more than we thought. I also believe that a native experience, one that matches the otherwise existing UI interactions should be king. Throwing App UX paradigms into website or desktop app bound to feel terrible. Maybe it can be made more enjoyable to use with better configurations more in line with the respective platforms.
It's not trivial.
Dart makes Typescript look like a joke. The build system alone makes flutter better than React Native !
I'm confident in being able to build any CRUD app in dart
Edit, in fact how many of you have actually built a project in flutter .I can't believe anyone would want to go back to react native after trying it
Like with Unity, the power of cross-platform development leads many to just assume apps work across platforms automatically. This is absolutely not the case, you need to properly QA any code you write and code it to accommodate each platform's quirks.
I would not buy a screwdriver if a salesperson walked up to me, said "look how great this screwdriver is" and then the chair they were holding as an example immediately fell apart in their hands. There's a difference between a dev community building apps that perform badly and the actual platform advocates showing off apps that can't perform.
All the Flutter demos I've seen today are saying "Do you want your app to, at best, take a long time or even fail to load, feel like scrolling through molasses, break when you click a button, and spin text around at 25 fps like a 2005 Flash animation? Well, have we got a framework for you!"
I strongly disagree re: Dart vs. TS, but then, I was a JS dev before I worked with Dart/Flutter, so probably a bit biased. But I think that is a very subjective statement, not objective.
I haven't seen one.
I like Flutter, but I don't think the Flutter Web design is very viable for production apps. It renders everything in canvas. Dart is already sluggish on native, and cross compiled to JS it's usually unusable.
I think Flutter will be a good choice for mobile and Desktop soon-ish, but for web ... maybe in a few years. Maybe.
ps: for me the Gallery is extremely laggy in Firefox, but works decently well on Chrome. Maybe wasm is enabled on Chrome only.
Dart still does not even have union types, probably the best feature of TS. I would hold off on that claim for now..
my_type = my_list | my_object
?
You can see why this is better :-)
But, in practice, a language's type system tends to optimize for the data structures that are idiomatic in the language. TypeScript is a heavily structural type system because idiomatic JavaScript often throws together unrelated types in this way (which makes sense when you're coming from dynamic types).
In a language that is built more strongly on objects and static types, it's less common to see APIs that "return one of these, or one of these, or on Sunday one of these things". So there is relatively less use for union types.
In other words, because people express unions at runtime less frequently in Dart (and other languages like Java and C#), there's less value in supporting them statically. Still some, definitely, but I don't think it's as critical of an omission as you might expect coming from TS/JS.
The "people use fewer unions in Java" argument is like saying people used fewer lambdas in Java 1.6. Build it, and they will use it.
I think you're confusing union types and sum types, which are very distinct features. SML, Haskell, and Rust don't have union types.
OOP languages can model sum types already. It's mostly a question of how much the surface syntax encourages that style.
I think _closed_ union types (the syntax `a | b | c`) are almost as good as sum types, since they bring exhaustiveness checking to the mix. They also act as documentation. Crystal is a good example of a language leveraging this feature.
The OO model of just subclassing a common class is quite poor by itself. Scala and Kotlin have a 'sealed' modifier to at least recover the exhaustiveness check. Both also have ways of safely doing the case switch on the object's class and simultaneously downcasting (Java too with its recent `match` construct, afaik). Does Dart have anything like that?
The natural OOP way to model an operation that must exhaustively be supported by a set of types is by making it an abstract method on a shared superclass. For problems where it's natural to keep the operations textually near each type, that works great.
Otherwise, yes, you'd ideally have some notion of a sealed family of types so that you can do case analysis with exhaustiveness checking. That lets you ensure all operations are covered when you program either in OOP or FP style.
Something I find odd is that FP folks often criticize OOP languages for not supporting exhaustiveness checking, but I rarely hear them admit that most FP languages don't have support for the other style that OOP does well, which is abstract methods.
- Scala has the whole OOP stuff - F# as well - SML: you probably need to do it by hand, with a record of closures, or something like that. It's ugly but it works. - OCaml has objects (it's in the name), first-class modules, or records-of-functions; all of which can replace abstract methods successfully. - Haskell can rely on typeclasses to do the virtual dispatch, I think. Not an expert on that.
So I'd say it might not be as ergonomic, but the capability is still 100% there.
But for me the main use for TS union types is to make discriminated unions, which is very useful wherever you have some form of a state-machine:
type AppState =
| { state: "loading", progress: number }
| { state: "selecting_level", }
| { state: "playing", level: Level }
| { state: "success" }
| { state: "failure", wantsRetry: boolean }
| { state: "error", reason: string }
(Small excerpt from a game we're developing at $dayjob)You can switch on that and the compiler will know what variant you're talking about, and it will apply exhaustiveness checks (ensures your code will handle all possible states)
abstract class AppState {}
class AppLoading extends AppState {
final int progress;
}
class AppSelectingLevel extends AppState {}
class AppPlaying extends AppState {
final Level level;
}
...
Certainly not as neat, but also, not that far off either. Then where you use this app state, you could switch over its `runtimeType`, and in each clause, the IDE will understand which implementation you are dealing with, and actually give you context sensitive help related to that particular state.If you instead only cared about one case, you would be able to do:
if (appState is AppPlaying) {
doSomething(appState.level);
}
Would this be somewhat analogous to the functionality you get with unions in typescript?Unless I'm mistaken, if one were to later implement a new class that extends AppState, all existing code would compile, but possibly fail or misbehave at runtime, unless you meticulously checked every place that tries to determine something based on those derived types.
In TypeScript, adding a new case for an union and not handling it everywhere is a compilation error on every incomplete usage site.
For example, try deleting one of the arms of the switch in this playground: https://www.typescriptlang.org/play?ts=4.2.2#code/C4TwDgpgBA...
I have to say, the default diagnostic isn't brilliant, but some tooling will give a better error and actually point out the missing arms, instead of complaining about the return type.
All in all, sufficiently analogous to not consider unions a missing feature of the dart language? Seems nice to have, but, maybe not very necessary. Especially if the only difference is whether it is considered an error by the syntax, or a warning by the linter.
Scala 2 also had `sealed` classes that could be used in places where you needed enums parameterized by runtime values and that's been generalized in Scala 3 IIRC.
The TS code indeed looks cool. This is an area we're looking at.
One point, though: we try to be very careful to not regress performance or developer iteration time (e.g., type checking time) when we introduce new language features. E.g., structural typing can be more expensive in general to type check since we need to recurse.
Have you considered not going full-on structural-typing but still providing some sort of union? In fact, you could go for one with even stronger guarantees, like the sum types in Rust or F#. (with Rust going as far as to call them enums too)
I'll admit I have the faintest notion on what causes that kind of complexity on a compiler, so my suggestion might be an even worse idea.
I work on Dart. The terminology gets really confusing here. "Discriminated unions" and "union types" are two quite different things, though they get a little blurry in TS.
The short answer is, yes, we're investigating pattern matching with exhaustiveness checking and making the language more graceful at expressing algebraic datatype-style code. The last half of that sentence sounds weasely because any object-oriented language can (except for exhaustiveness checking) model an algebraic datatype using subtyping. The parent comment using an abstract base class is how you do it.
So there isn't anything really fundamental that Dart can't express already. It's mostly a question of giving users syntactic sugar to make code in that style look more terse and familiar. I personally really like pattern matching and ADTs and I also particularly like multi-paradigm languages, so this is a subject close to my heart.
The language team has been pretty busy with null safety, but now that that's out the door (woo!), we can start working on the next batch of features, which with luck includes pattern matching. Here's an in-progress proposal:
https://github.com/dart-lang/language/blob/master/working/05...
I am really hopeful for it and am going to keep using on it for hybrid apps.
I try to just tell devs to try it, then judge it. Because it does seem weird up front, but it is such a nice experience for devs and can make great mobile apps.
Big part of it is thanks to the community which is providing all the handy packages to add some native stuff easier (such as permission, localization etc.)
I agree with other comments that Flutter Web is not ready yet I've tried to build web version for wish list sharing based on Flutter and I was struggling, so in the end I've switched to Tailwind + Vue. Some issues I had was that website didn't behave like website. For example I couldn't select text with my mouse. It felt and behaved more like a mobile app through the browser.
For mobile though it works (almost) perfectly, my example of the mobile iOS and android app build with Flutter: https://wishpy.com/
Although it loads a bit long at the beginning and I still need to figure out how to show images and icons without an uncomfortable glitch at the screen start.
Writing a desktop app _on_ and for Linux, that works on MacOS, and Windows ... and a web browser is beyond awesome. It'll probably work well on Android and iOS, with little effort, but I haven't even bothered to try yet. Before I add a dependency I will check out the code and run the demos (if there are some). I haven't had one fail or render strangely yet on a Linux desktop and nearly all of the existing packages were originally created/intended for a mobile device.
With web support, I personally have zero reason to ever write a line of JavaScript again. Why would I want to roll all my own basic widgets? I don't. Writing the logic for a performant and interactive list view, in JS and HTML, is woefully boring to me. I want a list view I can give data to and have a meaningful display of my data. I do not want to browse twenty different packages to find a list view that is the right mix of code I don't hate and features I actually want. I want that done because it's a solved problem, and takes time to solve right.
I couldn't be more excited for this release and future ones because Flutter is providing me a solution that fucking works.
I can say, because I've read quite a lot of code Dart and Flutter code over the past few months, that my experience does seem to be a newer one. I'm sure up until recently (past year or two) it was probably pretty awful at times because of constant flux and a myriad strangely broken shit.
Right now though, it's fucking great. Let me tell you a story even:
Hokay, so, there is this fucking "null-safety migration" going on and I'm thinking to myself, "oh shit, this is going to be fuckin' awful. Every package has to be updated or it doesn't work. This is gonna end up like Scala 2.11... Heat death of the universe or my obscure flutter dependency updates, which could happen first?"
Turns out, almost zero time, the Dart/Flutter team built a tool to automate it... the tool has a built-in "migration UI" with it to make the process super obvious and easy.
It was so easy, and generally correct, I proceeded to make PRs to add null-safety support to my dependencies because I realized I could do them ALL, myself, with a couple of hours of work.
</end>
What that says to me, is that Google's tooling is pretty fucking mature and that my quality of life is likely to only get better. I have never had an experience even remotely close with anything except Swift and that only works on and for Apple's specific platforms. I'd be worried of Google abandoning it if it wasn't for Flutter and Dart being what Fuchsia uses for its UI.
Here's the options I found.
- (language: Pascal) Delphi applications can now run on both Windows and MacOS.
- (language: Python or C++ and QML) Qt applications work on MacOS, Windows and Linux..
- (language: JavaScript) React native is being ported by Microsoft to both Windows and OSX.
- (language: Kotlin) Kotlin now has "Jetpack Compose" for desktop targeting Windows, MacOS and other platforms. It's like "React for Kotlin".
- (language: C#) Microsoft Xamarin applications can target both Windows and MacOS.
- (language: JavaScript) Electron lets you run your web applications as desktop applications on Windows and MacOS.
- (language: Dart) And now Flutter can be added to the list of ways to build cross platform desktop applications.
- (language: Java) presumably this is Java's forte but I did not look into it.
- (language: Kotlin) TornadoFX - JavaFX framework for Kotlin https://tornadofx.io/
We (AU MVNO/Telco) recently converted iOS and Android apps (200,000 MAUs) to Flutter and it has been game changing. We had experimented with react native and found it just didn't deliver. Flutter is different. On mobile platforms the experience is super responsive and smooth and for your typical consumer app indistinguishable from the native experience. The tooling and developer experience are incredible. The benefits and experience where so clear that the whole team was onboard - including the most die-hard career platform specialists. Our velocity and ability to deliver is measurably better.
We're looking at the web target as maybe "good enough". I don't think it could be a replacement for a well-crafted web app, but could be used to provide a fast alternative to the primary native experience, and for rapidly prototyping and experimenting. In the current state, Flutter Web could never replace our highly optimised ecommerce funnel - some things you just need to sweat the details. But it's definitely better than some of the CX in the corners of our legacy applications. Shipping fast is valuable - so build for native, get a good enough web for "free" and then spend time and attention on the web if it is warranted.
Can you expound on why you found that React Native didn't deliver?
I've played with Flutter a couple of years ago, and I'm revisiting it and React Native before building an app on a one person team.
You can even find the director of engineering for Flutter confirming that's not the case on a thread on Reddit along with numerous devs reporting being burned by Flutter and swearing off using it ever again: https://www.reddit.com/r/FlutterDev/comments/llmkd4/ios_jank...
However, this announcement page does not do a very good job at highlighting changes and new features from Flutter 1. The only concrete feature mentioned is the web platform being stable. Everything else is old news or plugging random companies.
The changelog (https://flutter.dev/docs/development/tools/sdk/release-notes...) looks like a dump of the VCS history, which is also useless. Sample changes:
- [flutter_tools] HACKTOBERFEST (cla: yes, tool)
- [manual roll] Roll Engine from 1ef10b240e28 to f84e7a019663 (12 revisions) (cla: yes, engine, team, waiting for tree to go green)
- use_is_even_rather_than_modulo (a: accessibility, a: tests, cla: yes, f: material design, framework, team)
I would strongly suggest adding editorialized release notes for developers.
The flutter gallery is useful for developers, but it's not a good showcase for what a real world Flutter app would look like.
The new Flutter Folio app ( https://flutter.gskinner.com/ )looked promising, but then I had to scroll way down to see the actual app links. The Web link looked promising, but I hit a brick wall when it wanted me to register a new account before I could do anything ( https://www.flutterfolio.com/builds/latest/web-build-auto/#/ )
Can we get an accessible, up-to-date, canonical Flutter demo app that doesn't require account creation, logins, or any other friction?
I had a vague idea that flutter 1 had a desktop/server like backing so that it could be used to develop desktop apps. Maybe this was incorrect, and only possible now with flutter 2? I'm still confused. This app: https://rive.app/ was made using flutter 1, no? It runs in the browser, so maybe this is the key difference with flutter 2, that... it allows native apps?
Of course, it will be achieved by delivering amazing developer experience and engineering in parity in all kinds of ways so this doesn't look obvious. But in the end, that is what it will be.
I mean... you're not wrong. But let's be honest, we never managed to really deliver on the web's promise here. It was <table> and <font> in the 90s, it's WebGL+Wasm now, but the reality is we've never succeeded at true portability (ever tried going to a non-trivial site in lynx? or a web app on your phone?) or accessibility (just ask anyone who uses a screen reader how accessible the web truly is) or customisability (have you _tried_ creating a user style sheet?) or interoperability (I spent a literal decade just trying to clean up the mess around HTML parsing and that was the success story!).
I just typed this comment using a plugin that gives me vi bindings inside the editor, on a page where I have increased the font size to 110% because I personally find it nicer that way.
All done without the permission of ycombinator and yet working perfectly with their web page. And this is not just because ycombinator has very basic HTML ... this works with at least 90% of web sites I go to.
It may not have achieved its loftiest aims, but I think the open web is an absolutely amazing achievement and success if you compare to what we would have had without it.
I agree that the open web is an amazing achievement. I don't think Wasm and WebGL take away from that at all. It's just the next logical step to make the web possible for an even greater set of applications.
I take this post as partial evidence that they're making this the real deal. It's already surprisingly good, and there's reason to believe that it will get a whole lot better.
There's no difference between CanvasKit and HTML as far as interactions are concerned. The differences are in pixels and performance. If there are issues with interactions, we'd like to hear about them. Please file issues on Github.
But yeah it's not grabbing market share that's for sure.
You're right -- we do render the controls, so that existing Flutter code (that might itself include custom styling or matrix transforms) just runs without change or surprise, but we integrate with the underlying browser support for things like text autofill and accessibility.
As the erstwhile editor of the HTML standard for ~10 years and the now TL of Flutter I must admit that it's weird to be creating a web framework that completely ignores all the HTML stuff I worked on before. :-)
That said, Flutter is different from Flash in some important ways. Flash used the NPAPI to "break out" of the web and was basically "native" code you could escape to, whereas Flutter really is using web APIs, like Wasm, ARIA, WebGL, JS, WebComponents, and so on, to create true web apps that just happen to not use much of the control set that HTML exposes.
I suspect that even outside of Flutter, the web in general is going to move towards this kind of framework in the coming years. It just gives you so much more control. It's basically how every other platform works -- pick your language, compile to machine code, don't need to be limited to what HTML and CSS (etc) enable.
That is exactly defeating the point. Flash apps were also "true web apps" that only happen to use the "limited control set" of just <embed>.
> It's basically how every other platform works
That's why there has never been a UI toolkit as successful as the web.
Not really. They were not portable. NPAPI was not a web standard in any meaningful sense (hint: the first N stood for Netscape).
> That's why there has never been a UI toolkit as successful as the web.
The web's success in terms of active users and in terms of deployed content is astounding, certainly. I think I'm relatively well placed to understand why, and I don't think it's because the web restricted developers to one scripting language or one set of controls. I think it is very much _despite_ that.
It's the web in the sense that almost every UI toolkit also offers a canvas (for example Tk does this) and you can reimplement every control using it. That doesn't make your new toolkit in a toolkit Tk.
But the framework? That will have to be updated when each OS the framework runs on changes.
The HTML controls are used by a ton of stuff, so they're quite likely to be updated. Your framework? I have to really, really trust you that you'll update them.
Look at how Motif or GTK or AWT or Swing or Tk widgets look on modern OSes. There's an entire graveyard of cross platform UI libraries out there.
I would be surprised if someone heavily involved in the Web's development process for a long time didn't have some really sore spots about it.
That aside:
--
What do you think of the loss of opportunities for learning and customization that moving to an opaque system running "in" the web (flutter) implies?
How did you get into the Web? Was being able to easily inspect and change what was happening in apps you didn't have intentional source access for (web pages/apps) not key to that?
Have you gotten value from the ability to quickly use others' extensions of useragent behavior that seem highly unlikely to work with this approach? Or will they be able to?
Fairly loaded questions I guess, but realistic ones too, not just philosophical.
Not sure what you really mean. If you mean the loss of "View Source" then I think we lost that a long time ago for anything but the most trivial of pages.
I used to say that view source was why the web was successful, and maybe it did help at the start, but I think we sailed past the point where view source stopped being useful years ago. Everything now is minified, and sites are too complicated for anyone to pick out what's going on from the original source let alone the actual served source...
> How did you get into the Web? Was being able to easily inspect and change what was happening in apps you didn't have intentional source access for (web pages/apps) not key to that?
I'm a weird case, I got into the web by reading the standards. (Then I got annoyed the browsers didn't follow them, so I got into browser QA. Then I got annoyed that the standards weren't clear enough to allow test cases to be written, and I started editing the specs.)
> Have you gotten value from the ability to quickly use others' extensions of useragent behavior that seem highly unlikely to work with this approach? Or will they be able to?
I have not. A lot of people do like extensions though.
Other platforms have managed to get concepts like extensions, e.g. on Linux (well, X really) I can replace my window manager, on Windows I can install DLLs that add features to Windows Explorer, on Android the "share" button can share to a list of applications, etc. There's lots of examples.
> Not sure what you really mean. [...] sites are too complicated for anyone to pick out what's going on from the original source let alone the actual served source...
I agree, View Source itself has become less and less useful. The Devtools in most browsers have kept up fairly well though. They provide a lot of methods to understand, debug, and modify behavior of whatever you're running using HTML/CSS/JS, even if not perfect.
Perhaps if Flutter became mainstream enough that there's theoretically nothing stopping this from eventually happening for it as well. That's an interesting thought.
--
I suppose that leaves my last question, and it leans away from what might be a practical view from your position: Do you think flutter pushing for major market share while also trying to replace the core part of the web (HTML/CSS/JS -> Canvas renderer/wasm) is a good thing for the web's health and future?
(That's a good bit more philosophical, but I hope in #CURRENTYEAR we're starting to see value asking long-term questions like that, especially from inside of the giant companies. I'll stick to one of those kinds of questions)
--
> I'm a weird case, I got into the web by reading the standards. (Then I got annoyed the browsers didn't follow them, so I got into browser QA. Then I got annoyed that the standards weren't clear enough to allow test cases to be written, and I started editing the specs.)
That is interesting, thanks for sharing that.
> I have not. A lot of people do like extensions though.
Also interesting, fair enough.
> Other platforms have managed to get concepts like extensions, e.g. on Linux (well, X really) I can replace my window manager, on Windows I can install DLLs that add features to Windows Explorer, on Android the "share" button can share to a list of applications, etc. There's lots of examples.
Perhaps a good new question is what kind of tooling is available or planned for users to interact with Flutter applications? Such as what Devtools provide, or an expansion to them directly.
As a developer, the Devtools are absolutely critical to my workflow and ability to learn from and often fix issues I have with other sites.
(It could be pointed out that native applications don't tend to have that functionality, so it shouldn't be expected.. but in this context we're talking about effectively removing it from the Web, which does)
FWIW Flutter isn't trying to replace the web. We're trying to offer a way of writing web apps that aren't really possible today. For example, something like the Flutter Folio demo, which works on multiple platforms including web, was written in a few weeks. I cannot fathom how I would do that without Flutter.
I got into web design/programming in the 90s, and the answer is basically no. Sure you could poke around a bit, but I never found it to be a revelation. I still had to buy books, read blogs, and do a ton of trial and error. Also, it was a never-ending game of trying to testing to see what each new browser release added or broke.
We are in infinitely better position today thanks to open source. The "View Source" of today is GitHub. Want to write a high-performance dynamically typed language VM? Here: https://github.com/v8/v8 Build an operating system? OK: https://github.com/torvalds/linux Build a database? Here you go: https://github.com/postgres/postgres
I love the idea, but this sounds like it's going to be unpleasant for me. Hopefully they figure out these UX things.
* The page takes about 20s to load.
* After pressing Run, nothing happens for 10s, then Click me! text appears.
* On clicking the text, nothing happens.
* On clicking it a few times, the page crashes and reloads.
As timsneath mentioned above, Dartpad is the dev environment. That means we ship the full Dart and Flutter SDK ahead of time as you can type/change anything in the code box. We also ship debug metadata to give better errors.
In production mode, we do a much more expensive compile to remove the parts of Dart, Flutter, and packages you don't use and to optimize/minify the rest.
It is working in Safari for me, but we've definitely appreciate bug reports if it's breaking for you (https://github.com/dart-lang/dart-pad in this case).
The labyrinthine rats nest of absolute hot garbage to beat a document rendering engine into a windowing toolkit with widgets is horrible. It's a testament to front-end devs that with enough effort you really can squeeze water from a stone.
And then imagine being so comfortable navigating that maze that you want your windowing toolkits to behave more like document rendering engines pretending to be windowing toolkits.
And you're like "why not just have a windowing toolkit for the web and sites can choose their rendering engine basically so all the SPAs get all the nice features of stack-based GUIs and document people get documents. Surely that would be less work!" And I think you're right but I doubt anyone would agree on a single toolkit so now you can just bundle your own compiled to wasm and rendered to canvas. Woooo.
In general Flutter for Web is _amazing_ if you want to deploy an app.
after seeing this thread, pretty clear to me its almost a perfect nerdsnipe - makes perfect sense if you're already building a Flutter codebase, sounds bonkers if you build web apps.
The "Create account" link isn't popping up the right-click menu because it doesn't use the Link widget. You'd get the same thing in plain HTML if you used a <div> with a custom click event listener instead of <a>. It's a simple bug to fix; totally up to the app developer. I think issues like that will inevitably pop-up as we have developers coming to the web from other platforms, where "open in new tab" isn't part of the toolkit. Perhaps it's fixable via education and platform-specific guidelines.
We're aware of the input blur issue. I think the bug is in the TextEditable. You can write your own, of course, but since we offer it as part of the Flutter framework, it's on us to fix.
I think this is right, but I also think it should be clear to everyone (i.e. in the first tutorial) that not using a Link widget will make this work wrong for all sorts of accessibility and UX reasons. And the Link widget should work across platforms and implement the equivalent of page history correctly.
Maybe it's worth writing down somewhere what the equivalent of each tag from HTML is; what is the canonical way to create an h2, input, textarea, button, a, img, etc.
This is the issue. Instead of having one codebase that works the same on all platforms (ios, android and web), you get (as a developer) the blame for not implementing things correctly across the different platforms.
Instead of a cross-platform development environment doing that for you.
I think its because we might be seeing it from two different points: i.e. you see Flutter Web using Skia is not consistent with _other websites and thus traditional webapps_, I see that Flutter Web using JS/HTML made it _not consistent with deployments of the same Flutter code to Android/iOS/Mac_
Definitely see that viewpoint and why it's problematic, would argue as an independent dev, would care much more about 100% self-consistency across my product line up for ease of support than whether people open the app in a web browser, you can right click on anything that looks like an image and download it.
Understand that viewpoint _also_ sounds like sacrilege, but as someone raised on iOS dev, reminds me of when Mac devs being upset over years as "iOS-isms" made their way to the desktop. I love that this approach is an example of solving hard problems over years, fixing a industry-wide yak shave that ended with you having 50 copies of chromium. solves the same problem Electron is solving with none of the downsides
dstaley just said that those issues happen now. " I just tried a few samples, and ..."
I just tried the demos over at https://flutter.github.io/samples/#?platform=web and I concur, Flutter is utterly horrible for everything the web stands for. So not amazing and seems to actively make everything worse.
We certainly don't think Flutter should replace HTML or other frameworks. We hope Flutter will work well for many use-cases, but the web is huge. There's room for multiple approaches. If it's not working for your use-case it's totally fine with us if you use something else. We welcome constructive feedback on what's not working so we know where to focus our efforts.
If you're trying to create a classical website, it's not the right tool. Use html and css. If you're trying to make a rich app, I'd bet on Flutter.
I'd be interested in seeing it become easier to make a combination of the two -- flutter apps embedded in classical websites.
Sounds like Java applets.
If the accessibility story isn't rock-solid, frankly this is a non-starter for a lot of applications. Web apps suck in a lot of ways but regular HTML has pretty great accessibility properties.
Accessibility is actually a really big deal here on Flutter (Ian Hickson and I both worked on Accessibility in browsers for years). AX is something I feel we've done pretty well with on iOS and Android. Web is still pretty early days, but many AX features should work already. We have more AX work to do on web yet. We've not yet taken any Flutter Web apps through Google's accessibility testing processes similar to how we've done on the mobile side, but I expect we will soon.
This is terrible news. I thought Canonical learned from it's last decade of painful failures to converge desktop and mobile. They have different needs and it doesn't work. What this means is another dark age for the Ubuntu desktop environment.
Launchpad, Juju, Unity, Mir, Bzr, upstart, heck, I can't even remember them all.
I assume most of the showcases mentioned here (WeChat, Grab, Yandex Go, Nubank, Sonos, Fastic, Betterment and realtor.com) are Flutter-based on Android only?
Is there a well-built Flutter-based iOS app without jank now?
The (new) google Pay app on iOS[0] and Android[1] are flutter based. I'm on Android, so I don't know it's behavior on iOS.
[0] https://apps.apple.com/us/app/google-pay-save-pay-manage/id1...
[1] https://play.google.com/store/apps/details?id=com.google.and...
I replied above as well. My team has also not been satisfied with the performance of the GPay app on all devices. We've been working with the GPay team since release and made many improvements in both Flutter and the GPay app. I expect there will be an updated GPay app soon, with still more performance improvements in the pipeline.
NFC on the other hand is so unreliable as to moot the use of Google Pay, which is unfortunate. I really prefer tap-to-pay over anything else, but not at the expense of making people in line behind me wait as I try various workarounds like toggling NFC. I realize there's nothing you can do about it - my grumbling is more a warning to folks who (like me) may have used it previously on the Pixel 2 and loved it. It's problematic in the Pixel 4. :shrug:
https://www.androidpolice.com/2020/10/26/tap-to-pay-issues-w...
The work arounds seem to be:
0 - Remove any skins / bumpers / cases from the device.
1 - Lock and unlock the device.
2 - Toggle NFC mode.
3 - Reboot the phone.
I've seen some speculation that on the Pixel 4 it could also be due to some flexing in the case. During a two week period where I couldn't find my wallet I spent a lot of time trying to make it work because of Chase's allowing tap-to-authenticate on their ATMs. Out of 100+ tries using those work arounds and several different ATMs (in case that was the issue) it worked once.
I ordered a tile for my wallet since I can no longer rely on my Pixel 4 as a replacement credit card.
According to AppAnnie, most of these are using Flutter on iOS too: WeChat, Alibaba, Grab, Nubank, Sonos all show up on their list of Flutter-powered apps on the Apple appstore. We don't capture analytics on apps, so our sources here are external sites like AppAnnie (or occasionally, direct connections with the development team).
Edit: If the signup screen in the Grab iOS app is written in Flutter I'm very impressed. I want to believe.
Edit 2: Nubank: I only evaluated the sign-in screen(s), but it has enough animations at what seems like a very solid 60 fps on my iPhone X to convince me that Flutter on iOS is actually a real thing now. Very nice.
They write about their development effort here: https://building.nubank.com.br/scaling-with-flutter/
Edit 3: Maybe I jumped the gun here. Quote from that post: "We’re also facing hard prioritization decisions, especially in flows and screens that work very well in their current state (native Objective-C, Swift, Java, Kotlin, or React Native) for which there are no near-future update plans."
Shameless plug, the app is https://droppod.gg, an app to find time to play video games with your friends!
I don't know if that's flutter or you, but it doesn't fill me with confidence.
I'm tired.
However, I worry about accessibility story for Flutter applications. Am I naïve? Should screen-reader support be a concern for the kind of complex visual applications that Flutter is built for?
Flutter 2 also supports accessibility for web apps, and you can use Windows Narrator, VoiceOver, TalkBack, or ChromeVox screen readers to navigate a Flutter web app.
> Today we’re announcing the beta release of Google Mobile Ads for Flutter, a new SDK that works with AdMob and AdManager to offer a variety of ad formats, including banner, interstitial, native, and rewarded video ads. We’ve been piloting this SDK with several key customers, such as Sua Música, the largest music platform for independent artists in Latin America, and we’re now ready to open the Google Mobile Ads for Flutter SDK for broader adoption.
The post isn't 100% clear on this.
I tried out Flutter a while ago, and it's really promising as the only really viable alternative to the JS/browser stack for cross platform GUIs.
Dart is not terribly inspiring and lacks the appeal of other new languages like Kotlin or Swift, but it's fine; as in: boring/easy to pick up and good enough for frontend, although somewhat sluggish.
ps: I personally don't see the design of Flutter Web as viable for production apps, so if you need Browser support, a JS stack will remain the only solution, at least for a few years.
It's such an easy language to pick up, and if you know TypeScript/Java/JavaScript, it feels immediately "home", you just know how to do things.
Regarding Swift and Kotlin, yes, they have more features, but that makes those languages also harder to learn and more difficult to master. I think Go demonstrated that more simplicity is also important and more features does not automatically mean you'll be more productive (that's not to say that Swift or Kotlin is bad, I just want to express that Dart feels great).
Extensions, null-safety are already here, and data classes are being worked on, so I think the Dart teams listens to the feedback from the community and prioritizes well.
Is that a reasonable assumption?
If so, I wonder if there's anything that could be done to help match the right rendering strategy to devices that handle it better (e.g. DOM on slower devices). Seems easy enough on Android/iOS where you know the device specs (mostly) and can target them, but the web is a huge beast of variance.
These things are big obvious things that make me uninstall an app even if I want/need to use it. Again, I don't know if it's you or flutter that made this thing behave like that. But it makes me think flutter apps are all just one big mess.
There’s a bit of chop in the scrolling and it feels completely linear, instead of elastic like native iOS apps feel (and websites).
I'm a big fan of your app! It has become the main way I consume and watch stock data.
There are some minor issues however. The "Watchlist" header has an issue where it renders under the back button both on Android and iOS. Also the Watchlist view can have some jank while scrolling unlike other sections of the app. Finally it'd be great if the app responded to the system level dark mode setting instead of having it's own toggle.
Overall though, great stuff so keep up the good work :D
And thanks for your suggestions as well. Currently working on migrating to Flutter 2 and will look into it after that. :)
Flutter web last I checked was a bit strange, especially how text selection didn't really work. That was a showstopper for me so I didn't continue, but I'd definitely be interested in trying it again.
Overall very excited to see this release.
Maybe this is some common language thing I haven't seen before, but it seems an "obvious in retrospect" sort of idea.
[1] https://flutter.dev/docs/cookbook/plugins/picture-using-came... [2] https://pub.dev/packages/geolocator
We've spend the last 25 years hacking a document renderer and scripting language aimed at 5 line form validation logic into the be-all and end-all of modern application development. Browsers sit at 10s of millions of lines of code, with thousands of people working on them. We depend on a standardization committee to have things like the common controls you could find in a Smalltalk-80 UI, and these are still insufficient for many purposes such that developers end up cramming together a million diffs to create the controls they want, in the style they want.
The writing was on the wall once we had a canvas element, aka a drawing context, and webassembly, aka a vm target you can compile to. We can keep building up giant garbage heap of complexity and saying that's what we meant to do ( https://youtu.be/oKg1hTOQXoY?t=814 ), or we can take step back and ask if we can provide simpler lower level tools on top of that.
With that said, I feel somewhat ambivalent about all of this. Of course the web is an open standard and has provided an incredible explosion of knowledge and utility for everyone. Any sweeping changes to that should elicit feelings of caution I think. Things like accessibility are important, although I think that enough people recognize this that we don't need to worry about it being left behind with this approach and I would also say the ocean of divs approach isn't exactly great for accessibility either.
Will this take off and be the first of a new kind of application development? Maybe, or maybe we'll all look back on it in 10 years and wonder what the hype was. For my part I do feel like some sort of change is going to happen, the current approach of piling more crap on top of the current html app dev paradigm feels unscalable, while the strengths of how it allows for app distribution feel like something that we can never get away from. Will Flutter retain those strengths and leave behind the weaknesses? I hope so, and it make me excited for the future of web development in a way I haven't previously.
This is another attempt from javascript/web front end developers trying to unseat native apps.... with the naive promise that is truly build once, run everywhere...
It hasn't worked since 1995.... as these frameworks get decent, native apps push the envelope and user expectations just increase over time, and apps created by these framework just look outdated or as toys.
If you can render swipes, fades, blurs and transforms you can create premium experiences without being native.
Also, it isn't FE web devs driving Flutter. I know a lot of mobile cetric devs who really love it.
I don't know how they can claim this. The new Google Pay on Android was noticeably laggier the moment it was released. It continues to be so, and I still hate using it. Now I know the cause.
I was also pretty salty that the new Google Pay app was marked as "early release" so you couldn't leave a review on the Google Play Store. That's fixed now though.
The initial GPay Flutter release definitely had some performance rough spots. We've learned a lot from working with that team since release and have made resulting changes in both Flutter and the app code.
GPay hasn't released since December last I checked, but I expect the next release should perform better on both iOS and Android and we will be continuing to work with them closely over the coming months.
go ahead and take time to downvote my comments. do you boo
iow, maybe they dont have access to all the internal implementations that give the native toolkit higher performance...
can anyone clarify that?
It is refreshing to be able to start development quickly without worrying about tooling (react-native), CI, etc.
Also I feel like Dart is perfect. It's a joy to use, I feel like this is the future. It's not es6 and it's not Java either.
Those seconds are excruciating when I'm at a checkout trying to actually use the app, with a large line behind me and a checkout person staring at me.
But the question that comes to mind with this kind of the technology from Google: is there any mandatory Google services that I'd have to use? Just as an example: Do I have to use Google's ad platform or I can use any other service?
For Canonical, it is critical that they can deliver rock-solid yet beautiful experiences on a huge variety of hardware configurations. Moving forward, Flutter is the default choice for future desktop and mobile apps created by Canonical.
--so what happens to gnome...?
For the startup we just founded i was able to crank out a mobile app in less then 3 months without prior mobile or dart experience. Its fast and just works from day one. Certainly something i can recommend for every Fullstack Dev out there who wants to add mobile to his portfolio as 95% of all apps can easily be done in flutter.
The widget aproach for mobile is fantastic cant say it will work the same on the web but certainly on the desktop.
One thing flutter needs is time, that certain champions will be chosen by the comunity (state managment etc.) - see react
But is has a vibing ecosystem that especially empoweres people outside the western world to create beautifully widgets.
- sign in to some back end
- create and edit data using forms
- browse data in some sort of datatable/datagrid
- use ajax to GET and POST data
But such a demo is pretty much never there - I certainly can't see it in this case. But surely the vast majority of ordinary desktop applications people need to build are just this ... CRUD with auth, ajax and data browsing.
It would be dramatically easier to give a new technology for desktop applications a try if such a demo was provided.
This isn't strictly related, but can we instead make good, useful experiences that are consistent with the platform instead? I'm sick of companies making their app some lowest common denominator abomination to push their "brand"…
Anyone know the story behind that?
https://techcrunch.com/2012/03/26/flutter-app-webcam-y-combi...
That said React Native is plenty good here even if the language ecosystem it's in is a bit of a mess. And I think there's a bit of work to do here with regards to the web before I'd adopt Flutter 2 for my business.
I tried a few different examples both on my desktop and my iPhone via safari and design wise the demos look really good, but the experience left a bit to be desired in terms of choppiness, user cues where pressing buttons left me wondering if anything happened until I saw red highlights around a text box and certain things not working, text highlighting is a big one for me and something I use all the time on my phone.
I'd definitely try Flutter out for a personal application but for my business if I was not going to develop a native app I think I'd still go with React Native for now.
Also I think they are looking to get revenue with their own Cloud services that integrate seamlessly with Flutter. For example Firebase is the #1 backend most Flutter Devs use.
I'm not totally sure what you mean by "a toolkit for platforms they have a vested interest in". Google has a vested interest in basically all the platforms out there. They might create Android, but they certainly make a lot of apps for iOS. I'm guessing they'd like to simplify things using Flutter. Mac and Windows might not see a huge number of native Google apps, but that could change over time - especially if they have a way of making a web version and a desktop version out of the same codebase. Imagine a native macOS Gmail client using Flutter. The same code that could compile to JS for the web could compile down to native for macOS.
Having something be open source and widely adopted makes a language and ecosystem stronger. The Go authors noted that they open-sourced Go because it would become stronger as more people used it.
And I wouldn't underestimate the soft power that comes from being in charge of one of these things. VSCode, .NET Core, and TypeScript are all free, but it's given Microsoft a huge amount of soft power in the ecosystem and a lot of credibility and mind-share.
With a cross-platform UI kit, you can definitely end up with a lot of power. Maybe the experience on Android feels better and more native because your engineers are putting their effort into the Android UI and its patterns more. That's not to say that they'd purposefully make the iOS experience bad or anything, but maybe the iOS-style widgets don't get quite as much polish and maybe developers get encouraged or defaulted into shipping Android-style Material Design apps to iOS. Again, I'm not saying this is malicious, I'm just saying that Google might spend more time on the pieces that are important to them. Google's web docs for Flutter could easily include sections for "and this is how you hook it up to Google Cloud".
I think it's also important to recognize that while Android has more marketshare globally, Apple is generally more popular in the US and generally more popular with upper-income folks. Apps like Clubhouse often launch as iOS-only. 11 months after launch and the Hottest New Thing™ is still iOS-only. If Google can convince developers to use Flutter for the Next Big Thing™, it guarantees that it will be available for Android.
I think there's a lot of value for Google. Your teams can build better apps in less time cross-platform. You potentially become a leader in the way that Facebook has with React, Microsoft has with VSCode/.NET Core/TypeScript, etc. You guarantee first-class support for your devices. You guarantee that the new things you want supported will get supported since you can prioritize your engineers on it - and potentially even get supported in the way you want. And potentially some nice tie-ins to Google Cloud and Firebase via first-class support, documentation, etc.
There are lots of libraries for abstracting over the differences between iOS and Android for a lot of these things, but it turns out the least common denominator between the two doesn't leave you with much exciting functionality.
Tomato, tomato
- https://www.linuxfoundation.org/en/press-release/new-mobile-... - https://mobilenativefoundation.org/
I anyone using Flutter in production currently?
I really do believe in flutter's future though. Developer experience has been a blast. coming from iOS I've saved so much time with hot reload
Qt also has a WebAssembly build for QML apps on the web but in my experience it has suffered from some of the same issues reported here about the Flutter WebAssembly runtime.
Edit: One key difference is Flutter seems to do everything with procedural code. QML is based on a declarative DSL plus Javascript.
Incidentally, I was pretty sure that Dart was dead. Turns out it's alive. I'm not sure what it is currently, now that it's statically typed, null safe and all. What are Dart's killer features?
Looks like we're discussing one - flutter?
It's not clear to me that killer features are really a thing for most languages. Sure Haskell has laziness/purity and Rust has ownership.
But what is C++'s "killer feature"? C interop? It used to be OOP but it's not that any more and yet C++ is still massively successful. What is Java's killer feature? GC? C#'s?
I think most languages don't have killer features, they have killer platforms and frameworks. For C, it was Unix. For Java, it was servers and the broad set of libraries. For C# it was WinForms and now Unity. For JS, obviously, the web.
While Flutter works for mobile I cannot see Flutter for web succeeding. The latter will end up in the Google graveyard for sure.
(disclaimer: I'm the author)
As a Flutter developer, I don't think Flutter will ever be a great choice for a lot of text-heavy things that people generally consider "web apps" (just going through my tabs now - GitHub, StackOverflow, reddit, Gmail, Wikipedia).
But it will really shine for "traditional" desktop-type applications, but delivered via web (think Rive, Figma, Filmora, etc). I think that's why they're focusing on rendering performance.
That being said, Figma have done an amazing job with WebAssembly (and I guess they rolled their own UI framework?), so it's not like Flutter is the be-all and end-all.
I say that because if you strip or pack the binary, instead of working it shows the output of running dart with no arguments.
It depends on how you run. Dart can either run in JIT mode or AOT mode. In general, when you ship a production app (e.g., for Flutter), you are using AOT - i.e., it's compiling to native machine code. In this case, there is no interpretation or compilation at runtime. We still bundle a runtime for garbage collection.
$ cat a.dart
void main() {
print("hello world");
}
$ dart compile exe a.dart
Info: Compiling with sound null safety
Generated: /home/x/a.exe
~ $ strip a.exe
~ $ ./a.exe --version
Dart SDK version: 2.12.0 (stable) (Thu Feb 25 19:50:53
2021 +0100) on "linux_x64"
If I run without --version, it prints the same thing the 'dart' command does.https://github.com/dart-lang/sdk/issues/45197
It is AOT though. If you time `dart a.dart` vs `./a.exe` (pre strip :-), the latter should be considerably faster.
`dart2native` just concatenates two binaries together: AOT runtime binary and AOT snapshot binary. AOT snapshot is an ELF binary which contains native code generated from your original Dart code.
The approach is not pretty but was chosen as an implementation shortcut.
That's why `strip` does not actually do good things to the binary.
There is no reason to run `strip` on such binaries - because they don't contain anything strippable.
I didn't inspect the binaries, just try to see how/if they compress.
0 - https://flutter.dev/docs/resources/architectural-overview
1 - https://github.com/flutter/flutter/wiki/Custom-Flutter-Engin...
- MFC
- WinForms
- Windows Presentation Foundation
- Xamarin & Xamarin Forms
- Universal Windows Apps
- WinUI 2 & 3
- React Native fork for Windows (based on WinUI 2 migrating to WinUI 3)
- React Native fork for Mac (based on AppKit)
And now they also contribute to Flutter, wow.
you have to use the Amplify library from AWS
How do they compare?
A modern UI, crossplatform, AOT compiler UI toolkit, that includes phones, web, and desktop
Not even dotnet could achieve this
Even if i'm not interested in that kind of development, let's hope people pick this instead of the atrocity that is electron
I said provide, not "goal"
AAA publishers are pushing heavily for this since it makes piracy and hacking obsolete and they always get what they want - there's no way that this is not the future of "popular" gaming.
a.) Google fixes Flutter Web and all of its idiosyncrasies
b.) Google removes the jank in iOS apps.
Kotlin is pretty great - so you're in this situation where you can either learn Flutter or JavaScript - at least with JavaScript you can also target the web (I'm aware that Flutter 2 also can target the web, but it's not the same thing).
edit: I must clarify - I'm not saying software development must necessarily have only one language, but rather that there exists a single language that can target all environments natively. C was close, but then the web and mobile happened. Java was also close, but no dice. We're getting there, I think.
Perhaps I'm misunderstanding you.
French 0,5 x 3 000 = 1 500
The period thing is very tricky, I often parse big numbers in English are super small ones.
[1] https://en.wikipedia.org/wiki/Penrose_graphical_notation
I know 3-4 options just for C#.