Categories
Journal

June 23rd, 2019

I have had a productive week. Thanks to MTECHVIRAL‘s Flutter series I am making a swift progress in learning the mobile and desktop hybrid programming language.

I find Dart to be super close to Java with a lot less boilerplate code but I still find Kotlin to be my favorite programming language. Although learning Flutter would mean that I could write mobile, web and desktop apps all together which would be a big win for me. Although Kotlin can also do that but it seems like Kotlin being a JVM language brings a bit of cruft with it.

I saw use of new keyword and also a semicolon to end a statement in Dart but I am glad to know that Dart 2.0 has made new keyword optional whereas semicolon is still required to end a statement.

Dart is very similar to Java and most Java developers will have no issues learning it. In fact it could be picked up in a weekend.

In Flutter like in Android where main container is an Activity and anything drawn on the screen is a View similarly in Flutter everything is a Widget. My understanding is that in order to create Material design apps we have to start with a MaterialApp object. Inside a MaterialApp object resides an object that provides the structure to start drawing widgets on. This structure is known as a Scaffold. Within the Scaffold, the MaterialApp package will provide you button, text fields, etc. which are similar to what we have in Android.

Another main Flutter concept to understand is the concept of a State. There are two types of widgets in Flutter. Flutter widgets are of two types which as stateful and stateless. Anything that you can interact with and if this interaction changes the state of the widget then the Widget is said to be a Stateful Widget. For example, a Checkbox comes with two states checked and unchecked and you probably want to use a Stateful widget if you want your users to be able to change the state from checked to unchecked or vice versa. The second type of widgets are Stateless Widgets. Any widget which doesn’t change its state or remains the same throughout the life cycle of the app would be a Stateless widget.

Categories
Journal

June 19th, 2019

I happen to meet a full-stack developer, over bonfire, in a secluded property in Coorg, Karnataka, India. Instead of mingling with other wanderers we had to talk about development. He made a strong argument about mastering your current skills and skills that may come useful in future. He also made strong arguments regarding hybrid mobile development.

I have for a long time resisted venturing out of Android world and that too native because I want to be master of my trade and not the jack of all. Although the amount of stage time that Flutter is getting has made it difficult to ignore.

The current plan is to spend one day on native development and other day on hybrid. The burning question is how to begin learning. I quickly ended up on the blog post – I want to learn Flutter. How to start? by Pooja Bhaumik.

I have worked my way through Pooja’s talk and have also quickly skimmed through the Google Codelab. The links can be found in Pooja’s blogpost.

I intend to start building project in Flutter as soon as possible as I don’t want to get too theoretical. I want to see if Flutter could be used in one of my projects.