Flutter Release Preview 2
developers.googleblog.com
developers.googleblog.com
Flutter has done cross-platform right. And it's somewhat sad and counter-intuitive but pretending to be native is a lot better than actually being native. iOS and Android are just too dissimilar in areas to provide a common layer on top of. In particular routing which is a mess with React Native.
Flutter also has the best development experience period. Nothing comes close. Compilation is fast. The reload cycle is instant. The tooling is excellent. It is really polished.
I just wish it had not come from Google because you always get that niggling feeling like it's going to abandoned. Which would be a real shame.
I don't know if this is helpful in assuaging your concerns?
No individual at Google can assuage any concerns caused by the corporation as a whole. (maybe the CEO could?)
GP has certainly assuaged[1] (although not eliminated) my concerns.
[1] assuage, verb, make (an unpleasant feeling) less intense.
So what value is a useless and pointless gesture that appears to be a marketing/public relations tactic?
Is there any chance that the Flutter core could get bindings to another language in the future? Regardless, thank you for your work on Flutter; if not Flutter, at least it has paved the way for demonstrating a "native-imitation" makes a lot of sense with regards to developer productivity and performance, something that sorely needed more buy-in from the mobile community.
On another note, is there any workaround to have true non-nullable types?
As far as the cost of having one codebase goes, right now it's somewhat of a worse is better approach; we're looking into something that heavily improves things and is worth rewriting our apps into. RN hasn't been it due to its FFI/bridge problems not making us comfortable and Flutter is something we've been looking into but the language has been a deterrant, so it's hard for us to argue "yes it's better on every metric and worth the effort".
https://github.com/dart-lang/sdk/issues/4938 (Unions) https://github.com/dart-lang/sdk/issues/421 (Tuples)
Please feel free to contribute here! That said, it's certainly possible to work around these things. Dart has a tuple library (https://github.com/dart-lang/tuple) which covers a lot, and much of what you'd use Unions for can still be covered by accepting `Object` or `dynamic` parameter types and doing some typechecking.
I think nullability annotations have been the one major feature that have reduced crashes in the mobile apps I've worked on, and I've worked on some huge ones.
If google is using it internally, the risks change. After the Angular 2.0 debacle I’d fear Google Just up and changing everything and not providing a smooth migration pathway because they can. They probably won’t cut it, but that doesn’t mean that they won’t inadvertently hurt you really badly
Second, they immediately announced no migration path and no more bug fixes at the same time. I’m not sure if they stuck with that, I was in the backbone camp at that time, but that is a painful pill to swallow. That they made that call without considering the downstream pain is a sign to me that I should be wary about depending on them
Angular 2 was released in Sep 2016. AngularJS continued releases up until Jul 2018, with 3 years of security fixes after that. 5 years is plenty of time to rewrite your app.
You’re right, 5 years is plenty of time.
There are still some really weird problems that occur, but after fixing those with `flutter clean`, it's hands down the best experience I've ever had making a mobile app.
React Native is not something that I would even consider, for that I would rather do Web apps/PWAs.
Almost everyone here talks about abandonment. It's become a sad Google reality, but I'd hazard that some people are posting from Google Chrome, which would defeat the point about worrying.
I use Flutter, I've released an app that's been in prod for about 5 months now. Flutter runs on Dart, which is a Google-bred language. From my little knowledge, most/some of the people working on Dart are the team in Aarhus that work(ed) on V8. Our Vyacheslav Egorov (mraleph) being first that comes to mind.
Is Google going to abandon Flutter, what about Dart? Should I not learn Go because they'll also abandon it? Heck, should I not develop for Android because they'll abandon it too?
The fearmongering is a bit excessive. I'd think Google has a better track record with software platforms. I separate Google into:
- Products - come for free, can be abandoned any time
- APIs - come for free, don't build your business around them in case MapsGate price surges come your way. Or, if you rely on them out of being "free", always have contingency plans to switch. After all, if they build a market then destroy it, it's a good space for smaller players to join in.
- Software & Platform Tools - feels safer, unless very experimental.
___
Flutter allowed me to do in a few days what Java/Kotlin was taking me weeks. Why? It makes developing UIs much easier. As one can see from the RP2 announcement, background execution looks hairy, app size is improved but the build process still lacks what native has (e.g. updates to an app result in user downloading whole apk).
Will I have to rewrite my app again when Flutter is abandoned? Sure, but it won't be an overnight rewrite. I'll probably be able to get away with a 1-2 year window (if I need one) before the last supported Google Play Services becomes obsolete.
For me, I'm willing to take that upfront benefit. Yes, downside's learning yet another new language. I learnt Dart, and it was about 80% similar to the langs that I already know.
I don't think most people are making a principled stand against the use of Google products, they're just instinctively performing a risk analysis.
[0] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...
It adds little to the conversation if someone just says "scared of abandonment" without providing more context. Yes, one's entitled to that opinion, but it's slightly misplaced sentiment.
Out of interest, how long would it take for one to migrate from Go to say C or Java (if Go is killed)? Similarly, how long to go from some Google cloud service to either another provider or a different other service?
I agree with you about instinctively performing a risk analysis, but was offering a different perspective that perhaps one should separate Google into a few categories, then make judgement per category.
How do you figure? How long have you been using/developing with Google products?
Microsoft had the same reputation a few years ago. They learned the hard way what happens when you piss off developers. They are now making great strides to right those wrongs. What is Google doing to assuage those fears?
The way they have managed Android itself should give all mobile developers some consternation. It is an absolute mess with a ridiculous amount of cognitive overhead. Its a utility OS now and a really bad one at that.
My gut tells me that Android will be abandoned soon. Samsung could kill Android if it wanted to...
Android: 3-4 years
GCP: <2 years
gRPC: 2 years (Kotlin, Python, Node, Rust, Scala)
From this and your other reply, you seem to have been burnt by something in Android. The mobile market for which I develop products is made up of over 80% Android. Whether Sundar Pichai decides to kill Android tomorrow or now, I'm not going to let that get in the way of me making a living from a platform that currently exists with a significant market share re. my target market.
In that regard one is safer (CV) using Qt or Xamarin, given JavaScript, C++, C# and F#.
Cross-platform frameworks always seem attractive because you can write code once and run it on both Android and iOS. When you start development it might also feel productive at first because you finish 80% of the project much faster than with using native platform frameworks. Problems begin when you need to interface with native code or if there are some small annoying issues. You get stuck for hours and days trying to solve something that would take much less if you dealt with native platform SDK. In the end you are not completely satisfied with your hacky solution and it took as much time as native app would take.
My opinion is that if you have a very simple app, it might be OK to write it in, for example, React Native of Flutter. But if you have a more complicated app and it's an important part of your business, you should go native.
Background execution was the biggest for me, I didn't want to write a Flutter plugin that interacts with a background service (because even though that's now possible, it still feels confusing to me).
Simple(r) app, Flutter's very good at that. I'll see what happens post 1.0
Uhhh, how do you draw that conclusion? There are lots of browsers and they take literally zero time to learn. Comparing a browser to programming language or framework is apples and oranges.
> Is Google going to abandon Flutter, what about Dart? Should I not learn Go because they'll also abandon it? Heck, should I not develop for Android because they'll abandon it too?
I have been a strict Android user for years. Google has effectively abandoned it with the way they've managed the project. I am moving to iOS for a variety of reasons, one of which is that I know where they (Apple) stand with the platform.
I wouldn't learn Go or Kotlin either, honestly, as there are arguably lots of languages that do the same with less separation anxiety.
My only mobile apps are Android only and regret it. I was a big android advocate and now I am not. I have been excited too many times and let down too many times to really care at this point. Google really wasted a lot of my time in retrospect. They announced projects like they are the second coming only to kill them once you have invested countless hours of time learning. I still have the OG Android ADK from I/o 2011...
So, Google just released a new pineapple, but because they tend to kill the orange trees, I'd rather not bother with the pineapple. Google Chrome is a Google product. A general fear/hesitance of using Google products should apply similarly to Chrome. Otherwise you're only validating my point.
> Google has effectively abandoned it with the way they've managed the project.
Our opinions differ, which is fine. I'll leave it there.
> I wouldn't learn Go or Kotlin either, honestly, as there are arguably lots of languages that do the same with less separation anxiety.
That's fair, there's lots of languages that do a lot of things. I often learn new languages because of promises to solve some existing pain points. Separation anxiety differs from person to person, and one has to weigh costs and benefits.
Java and C++ for my hobby coding on the platform.
Both skills much more useful on contexts outside Android development.
If I would need to write cross platform mobile apps production code, I would rather go C++ for business logic with native views, Qt, Xamarin or if performance requirements aren't tight, PWAs.
Dart makes it unattractive to learn Flutter, given its past history.
And Kotlin it remains to be seen how well it will faire in the actual Java world, outside Android, where we can make use of the latest versions slowly picking features from the alternative languages.
One thing that has really impressed me is how responsive the Flutter team is to developers. Often when I posted a question on Stack Overflow it would be answered perfectly within 24 hours by a member of the Flutter team.
Contrast this with React Native where Facebook's attitude seems to be to develop what they need themselves then 'throw it over the wall' to for others to improve.
The Flutter team is like a dog that really wants you to be happy. The React Native team is like a cat that doesn't really care about you as long as she gets fed.
The devs in the dart[1] and flutter[2] gitter chatrooms are even faster at responding to questions, in my experience.
I dabbled (briefly) in it, got flutter app running on windows + linux, though certain integration factors (smooth window resizing, stability, mouse wheel support, etc.) were not there yet.
For some of them (mouse wheel, keyboard, tabbing) there might be more work needed (and maybe not seen as important), but it could bring a real "electron" killer, where my slack, teams or whatever else "electron" app does not spawn 5 processes, and take GB of memory (granted, flutter still takes a lot, compared to leaner Qt, and much much leaner write directly using Win32), but then there are some sensible limits, and going below these (for the sake of perfection) doesn't buy you much nowadays (I no longer have to run QuarterDeck QEMM to shuffle my 640kb DOS+EMS memory efficiently around :))
I've seen Flutter run in lots of places, including desktops. Desktop isn't something my team is actively developing at this time (we're very focused on making mobile awesome), but we're definitely not stopping others from doing so. There is even another team at Google experimenting with the idea:
There's also this project which uses Go to run Flutter on Windows and Linux: https://github.com/Drakirus/go-flutter-desktop-embedder
Is your Windows implementation publicly available? I'd be curious to check it out.
I was able to get the gallery on, had to do some tweaks (like enforce binary mode when reading files, and certain other things, but haven't looked since then).
We're using it to replace our native iOS and Android apps enabling us to have a single code base. This is critical for a team as small as ours (2 devs covering web and mobile).
I can't sing its praises strongly enough, you can check out the code for our app here:
https://github.com/invoiceninja/flutter-mobile/
Edit: grammar is hard
Sorry for being dramatic but if you answered yes to any of those give a try to Flutter! You will be surprised of how fast you can develop an app for mobile with descent UI. Thank me later!
More mature, may target desktop OSes and use languages that are actually relevant in the market during the last 20 years.
Xamarin and Qt are fine products, and I know Xamarin has been working on some improvements over deploy times, but it still can't touch what Flutter does there. And if you know C++ and C# already, Dart is a breeze.
Flutter deployment times aren't worthwhile enough to bother with a language with uncertain future.
However that is very little against C# and C++, which can also be compiled to JavaScript/WebAssembly.
Additionally there are TypeScript, ReasonML, and a myriad of other languages with JavaScript interop.
If you have seen C#, Kotlin, TypeScript or Java code and understand it, you will understand Dart and will be able to use the language soon enough.
It usually starts with a small, new thing to adopt a new tech (e.g. a not-yet-important mobile app, or a medium-sized single-page web app), and eventually it can take over other parts of the stack. How fast it happens is really unpredictable.
Dart is easy to learn (espeically if you come from a JavaScript, Java, or C# background). It can be compiled in ways suitable for distribution in both Apple and Play Stores. And the Flutter team has direct access to the language team behind Dart to ensure that it works well for mobile development.
It's not easy to explain in a HN comment. Technical decisions like these never are. In this particular case, there is no single "Dart can do X and nothing else can". That's not true for any feature. It's the combination that mattered.
All in all, Dart was a really, really, really good choice. Not from a marketing perspective, obviously, but that's not everything.
Don't get me wrong. Flutter may well be a formidable piece of software. Dart either. I just don't get how flutter is marketed around the fact that dart was there first with no convincing use case and that people only then started looking for a raison d'etre.
When the chrome guys started the Sky experiment, now the flutter project, they started with javascript. I don't know why they dropped javascript, but they looked at several languages before trying Dart. Here is a floss weekly episode with one of the co-founders, talks about flutter's hotreload, an idea that came from the Dart team.
https://youtu.be/2C-2-tU6LLY?t=22m19s
If swift was opensource back then they may have gone with it and if they started today they may have gone with kotlin native.
Flutter's hotreload feature, something that they didn't know they wanted, was created after they decided to give Dart a go. While the Dart team had missed the boat on getting the Dart VM into chrome, they still had their internal customers using Dart2JS. The Dart team also had their own experiments in IOT and running on IOS.
Maybe Sky/Flutter guys saw Dart solving their problems that Javascript couldn't and they also saw that the Dart team has the expertise to help them in advancing their experiment to where it is today.
Honestly, the language itself is easy to learn if you come from a managed code background -- as ever, it's the domain knowledge that takes time to build (e.g. the libraries and framework of components and classes that any complex application takes advantage of).
However, it really isn't a difficult language to pick up. I ported a Java app to Flutter and it was mostly just a case of copying the class files and fixing the syntax errors.
Mobile apps are not only CRUD clients and do lots of stuff that needs tight OS integration. The last time I checked, flutter couldn't do Maps, GeoLocations, AR (ArKit/ARCore), Encryption, audio/video, file storage etc activities that are outside the normal purview of a CRUD TableView App.
Since flutter team seems to be active here, could anyone from the team shed light on these aspects?
Geolocation plugins have been available for quite sometime now, as have encryption and file storage.
In general Flutter takes the position that Flutter should not limit your choices and your apps should be able to do anything the phone can do. Flutter apps are just iOS or Android apps, you can always open up the ios or android sub-folders and write as much Obj-C/Swift or Java/Kotlin code as you like.
Flutter's core engine/framework are all about providing portable UI, and leave everything else up to "plugins" (the opposite of say the Web were everything is baked into the core platform). Lots of plugins exist today, but there are always more to write: https://pub.dartlang.org/flutter https://flutter.io/developing-packages/ https://flutter.io/using-packages/
Responses to your specific asks:
Showing arbitrary native views inline with other Flutter content is actively in progress: https://github.com/flutter/flutter/issues/19030 (already possible to show views to the side of/on-top-of a FlutterView of course).
Full inline Google Maps is similarly in progress: https://github.com/flutter/flutter/issues/73
There are several community authored plugins for geolocation e.g. https://pub.dartlang.org/packages/geolocator.
AR is not something I've seen any work on yet, but it's always possible to throw up a full-screen ARKit/ARCore view using ObjC/Java your otherwise-Flutter-built app.
Flutter includes BoringSSL as part of it's runtime, some encryption APIs are exposed, there is probably more for us to do here. There is also pure-Dart crypto, e.g. https://pub.dartlang.org/packages/crypto and of course always possible to write your own wrappers around iOS/Android APIs (which someone may already have done too).
Audio/Video plugins exist today, e.g. https://pub.dartlang.org/packages/video_player
Some storage plugins exist (e.g. https://pub.dartlang.org/packages/sqflite), definitely more to write here.
Always more to do. If there is something specific you believe my team should help provide, please let us know: flutter.io/support. Hope that helps!
Not having first-class Maps is a deal breaker for many apps, and having only Google Maps support is not what most developers want. I would like to port my current app, but without proper maps support Flutter feels like a cousin of Ionic.
What's the FFI story of Flutter? Could you please point me to the direction of using ARkit view using ObjC/Java FFI? From what I've seen we've to wire an OpenGL View to achieve AR capabilities, but I might be wrong.
While the crypto package is a good start, I was more interested in having access to the Trusted Execution Environment (TEE) on iOS/Android. Do you have any work being done in that area? Lots of apps (e.g. Fintech) have security audits and these things could be a deal breaker.
A cursory look the Audio plugins show that it's a wrapper around AVFoundation etc. and they are capable of playing audio/video, I would love to see an official plugin with 1-to-1 feature parity with iOS/Android AV API.
Flutter is a great project, but it seems to be plagued by the same issues that React Native, and Xamarin has.
Stats and benchmarks are neat but I'd really want to try it firsthand to know that it's "Fast".
Three largish apps you can try are:
1. The Alibaba app:
Alibaba app for Android → http://bit.ly/2NQJcMX Alibaba app for iOS → https://apple.co/2NjVGxf
2. The Hamilton (musical) app - search Hamilton on Play Strore or App Store
3. The inKino movie database app. The source code is available here: https://github.com/roughike/inKino
Another new example of Flutter in action is Reflectly, which was recently featured on the Apple appstore: https://medium.com/reflectly-engineering/reflectly-from-reac....
Flutter doesn't appear in SO Trends https://insights.stackoverflow.com/trends
http://sotagtrends.com/?tags=[ionic-framework,react-native,f...
That is, Flutter is shooting up and overtaking Xamarin but still only half the popularity of React Native. This also roughly correlates with mentions on Google Trends:
On job websites React Native is way ahead - which you would expect given React Native's headstart. For example, www.jobstreet.co.id currently has 43 jobs for "React Native" but only 5 for "Flutter".
A few months ago I read that React is way ahead of and still growing much faster than Vue, but people nevertheless hype it based on its GH stars.
That said, Wave doesn't seem comparable. Maybe GWT? If so, I'd be perfectly happy if Flutter has the lifespan of GWT, which is some 12 years old now and still viable (if perhaps a little crusty). 12 years is a phenomenal run for a piece of frontend tech.
I think the Android userspace might count as a technology that's been shut down. When Android first came out, it looked a lot like a mobile counterpart to a Linux distro with Gnome or KDE, with built in simple open source apps, like music, photos, downloads, and notes (now Keep). Now all these apps are littered with tie-ins to Google, and Samsung and Huawei have gone off and developed alternatives because it's annoying to use these apps without fully buying into Google (same to a lesser extent for Maps and Chrome). This might be a stretch though, and besides this I don't know of any Google technology that was popular and useful and got shut down in a way that reminds me of Google Reader.
When Google bought it, it felt a lot like buying the market. What Fabric tools are you going to miss, which Firebase does not have/support?
It doesn't make sense for Google to maintain two platforms that do the same thing indefinitely.
Twitter didn't have viable alternatives. They could have sold it to someone else, but who?
- Apple? Forget about Android support - Facebook? Not interested, they killed Parse - Google? Made sense, because the value of Fabric was the number of devs using it.
Fabric Crash Analytics was a strong product, why not bring in the team that developed it to gradually bring its features into Firebase?
Fabric is not a good example; it wasn't "abandoned" as developers were given alternatives. It also works better for us developers, because now I don't have to bundle a Fabric SDK and a Firebase SDK.
Lastly, given that Twitter is shutting down access to third-parties to their API, the value of Fabric's integration with Twitter might have dwindled for some people.
There are additions and tweaks here and there, but you can still make table views inside navigation controllers inside tab bar controllers using frame based layout with near identical code you would use in iOS 2.
Good luck to those that jump today into Android without the background how it grew up since the early days.
Documentation is outdated and many of the still documented best practices have long been replaced by Medium posts and SO answers about the new best practices that replaced them.
https://medium.com/@steve.yegge/who-will-steal-android-from-...
They chose an evil path of manipulating users into giving up privacy. Talking out both sides of their mouth with politics and freedom of speech and other things. Creating and dumping tech like hot potatoes. Attempts at mass manipulation of the internet (AMP, messing with the location bar). The list goes on...
Google is schizophrenic, and I don't know if they can come back from this in the long term. I won't even bother looking at any of their tech anymore, there are plenty of great alternatives to every service they offer without all the Google baggage.
Principles matter at some level, which is why many businesses abandoned Godaddy a few years back. But also there's simple budget considerations. Google has cost us tons of money over the years adjusting to their services. Now we don't have to anymore, and it's a relief.
If I am forced to spend money I'd rather spend it on something competition than to bolstering a belligerent monopoly and also support a system that will still be around, or at the very least, give two craps about our situation.
Maybe you are too young to remember the bad old days with Microsoft was the mean kid on the block. Google is getting worse than Microsoft ever was. And that is really bad.
(edit:React confusion)
Well, I am in no hurry with Flutter, we will see how things turn out in the next few years.
PWAs are being pushed by the Chrome team and Microsoft, which I have more faith than on Dart/Flutter, specially as skills to sell.
Likewise for C++ with native views, Qt or Xamarin.
What I care about is using a language where Flutter is the last hope to make it relevant in the market.
I don't need another one to pile on my Turbo Pascal, Oberon, Delphi list.
https://tech.olx.com/fast-prototypes-with-flutter-kotlin-nat...
In particular, this means that if you're running an Android app on an older device, it can still show the latest Material design widgets (and similarly for iOS, showing the latest Cupertino styled widgets, or Material).
You see, this is rarely what I want. I’ve seen time and time again people trying to emulate controls and it just doesn’t work. Apple has a whole team that’s spent years making the iOS UI look just the way it is, and I don’t trust any other team to be able to copy this without serious effort. Sure, it might look pretty similar, but something always doesn’t work: the control behaves differently, isn’t accessible, animates incorrectly, etc.
I encourage you to compare our iOS ("cupertino") widgets with the UiKit ones. We've still got many to implement, but I think we have the fidelity pretty high for the ones we've implemented. If you disagree please do file bugs, we care very much about fidelity.
[1] https://play.google.com/store/apps/details?id=io.flutter.dem...
It also makes it very easy for developers to create their own custom widgets/layouts that are pretty challenging to achieve in other platforms.
I hope you'll give it a try some time - if nothing else, you might be able to raise some issues to help us improve some of those details!
Sorry, yes it does - 'Dart language and core libs'.