This is just what I was waiting for. I’m on my way to ServerSideSwift from a proprietary cross platform language . Watching the brilliant Vapor3 Videos was a very good teaser, but I asked myself : what about a cross platform mobile development system ? It looks like I’ve got the answer . Can’t wait for the video tutorials.
Thx for the tutorial! Can you clarify a few things? Why is Flutter development only done in an IDE? All tutorials I have seen are done either in IntelliJ or VS. How the heck do you do any graphical layout? Is there any plan to build an IDE similar to Android Studio or similar? Right now it’s all cut and paste code to add widgets. Am I missing something here?
The Flutter team to date has only released plugins/extensions for Android Studio and VS Code. You can use other editors too and then work with the Flutter tools from the command line. Not sure if there are future plans for an IDE that would support graphical layout. But layout in Flutter is via the Widget tree, and to some extent the tree let’s you visualize the layout in code.
Having said all that, many of my iOS friends are starting to prefer doing their layouts in code and avoiding storyboards and XIBs, due to the precise control you get and also the ease of merging layout code in pull requests. Conversely, Android devs are now often using ConstraintLayout with a graphical designer in Android Studio to at least begin the creation their XML layout files.
We’ll have to see where Flutter evolves in terms of laying out UI. If Fuschia becomes a real thing someday, layout will be a key part of supporting a single app on both mobile and non-mobile devices.
Ok, I see! Very interesting! I kind of see a mix between code vs layout people, but I guess you get used to it over time. I come from a visual layout background so it’s very intuitive for me, but have now mixed a little of both. So it’s a matter of learning the workflow. I was able to create a few small apps and run on both android and iOS devices, it was pretty cool! It will be very interesting to see how it evolves over time.
I’ve been using Codename One for a while now and after seeing a few articles about flutter I tried it. Huge step backwards. There were some nice things to be sure but overall when compared to Codename One it’s years behind.
I liked two things in flutter: the on device debugging which isn’t really there in Codename One (you can use the native source for that but it’s a bit circular) and the styling is better than the resource editor. But Codename One is way ahead here with support for things like CSS and languages I prefer specifically Kotlin & Java.
Is there a way to use flutter with some of my existing swift code I wrote for my iOS app? I’m looking to build a port of my iOS app for Android and I thought Flutter allowed us to reuse code.
You can call platform-specific Swift code from Flutter, but you’d need to repeat that platform-specific code in Java or Kotlin within the Android portion of the app. The Flutter/Dart code itself is what is being reused. See more here: Writing custom platform-specific code | Flutter
Thanks Jeremy! Seems like many Flutter references out there put everything in main.dart, so I was trying to be consistent with them, but then decided at the end I wanted to clean it up, so I added the separate files.
Also, we have a screencast version of this tutorial where we use Android Studio instead of VS Code, and in the screencast we started with the separate files to begin with.
Hi. Thanks for the article - have spent the last 2 days on it!
Brand new so forgive me if this is wrong but I think Dart2 wants:
_members = JSON.decode(response.body);
replaced with:
_members = new JsonCodec().decode(response.body);