Who am I
I am an iOS developer with 4 years professional experience and some time ago I had felt like I want to try something new… decided to give Flutter a try. I am going to write a series of stories describing my experience with this new SDK from Google. I most likely won’t include any tutorials (might write a few tutorial stories if I end up liking the framework and there will be enough interested people into that) although I probably will post some code examples here and/or post links to useful articles, tutorials etc. so even if you are not interested into my story you might find something interesting for you.
Flutter is Google’s mobile app SDK for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
A few months ago I already tried React Native but gave up eventually since I did not have enough time in my free time (outside of work), neither had an idea for an application that I could write using this framework. I spent less than 5 hours trying out React Native.
This time it’s a little bit different (doesn’t this always start like that though? Haha😅). I will be writing a tracker for water drinking 💦. I know there is plenty of them (full of ads 🙈) already but it’s just simple enough to learn basics of new language and SDK, won’t take too much time to finish and I do not want (yet) to invest too much time into it in case I get busy at work with something else. Anyway, do not focus on the application’s topic, it won’t matter most of the time. I might share the application and/or the code in the end but will decide about that later on. So… let’s get started! 😎
I have set it up on MacOS obviously and I skipped configuring Android environment for now… gonna do it once I write some part of the app (probably next time). I hope it is gonna be smoother than the last time I installed Android Studio and all the dependencies, it was really painful compared to Xcode (why just not install some (most recent?) SDK and emulator by default?).
Downloaded v0.5.1-beta and followed the instructions that you can find on official Flutter’s page. Setting everything up for iOS development was quite simple since I already had most things installed but actually the ‘flutter doctor’ could actually ask me to automatically install everything needed for me… I know I am lazy but I guess I am just spoiled (kinda) by Xcode where I pretty much can start developing right after installing just one tool. Same with the PATH variable, but who knows, maybe once it’s out of beta it the configuration of environment for Flutter will be automated? It is just boring to do that especially because I had to do it twice in the short amount of time — once at work and once at home (or maybe I should not require such things and just write a simple bash script by myself?).
I had VS Code already installed so just added an extension for Dart and Flutter so everything (excluding Android Studio and its dependencies) didn’t take me longer than 15 mins to set up… not that bad 👍🏼 (btw. what would you guys suggest to use as an IDE — Android Studio or Visual Studio Code — what do you like the most while working with Flutter/Dart?).
It’s time to create a new project! I have added a new repository on GitLab (it’s where I keep my private repositories) and created a new project through VS Code command pallet, quite simple. The sample app started on the simulator with no issues as well, to give it a try on a device opened project in Xcode and configured certificate and provisioning there (is there a faster way to do that without running Xcode?). If I can compare it to React Native — it’s much better. I had some issues running a sample project there and none with Flutter so far (I am not saying React Native is bad, I just had the bad first impression with that 🙁 On the other hand I might give it another try in the future).
On the Flutter.io Getting Started guide there is a quick tutorial for writing a first application… Read a few paragraphs then gave up 🙈 (let’s take a harder way! Would be boring like that, wouldn’t it?). I don’t know why most “the first app” guides usually shows code examples without any architecture pattern at all 😬 As a “not a newbie programmer” I rather want to get started with some better example and learn the good practices (for Flutter) from the very start… started googling then. Found an article [here, thank you Harkirat Saluja] on Medium about project structure and decided to use that structure in my project. If you have any other examples of good project structure for Flutter/Dart — let me know, I would love to compare them ❤
“So far so good” — first thought that comes to my mind. I am pretty sure installing experience will be much better once it’s out of beta (it’s not bad though, just could be better in my opinion). Overall it feels similar to React Native (well, I spend 5 hours or less with both — RN and Flutter) but I had fewer issues setting environment up and running the sample application.
Also while googling about Flutter I found a lot of helpful people (for example on StackOverflow), posting complete code examples (Developers at Google?), so that’s really nice, especially for fresh developers who have a hard time learning from scratch.
“It does not matter how slowly you go as long as you do not stop.” ―Confucius
I am going to continue my journey with Flutter and hope I will last to the very end and finish what I started — this simple application. I am going to write another part for sure so follow me if you want to get a ride through Flutter together with me 🙂