To Flutter or Not to Flutter: An In-depth Conversation With Three Developers

If you keep yourself updated with the latest happenings in the tech industry, chances are that you might’ve heard of Flutter. Even if you’re not the one who keeps track of the news, you might still have noticed Flutter being discussed among developers. Either way, Flutter is the trendiest cross-platform technology creating a buzz. This is why I decided to interview three developers at Mikaels Labs who’ve learned this new technology to get their perspective on it.

If you’re a developer thinking of learning Flutter, this interview blog will give you an insight into what you can expect, in terms of the technical know-how, learning resources, and the challenges faced.

But before we do that, let’s break down what Flutter really is.

What Exactly Is Flutter?

Simply put, Flutter is a free, open-source Google mobile UI framework that lets developers build native-looking apps on both iOS and Android using the single code-base. 

Now that all is said and done, let’s move onto the interviews. Shall we?

The Interview: Meeting Developer # 1

PHP/Laravel Developer, Usama Imran talks about his experience of upgrading his knowledge to Flutter.

Photo Credits: Amna Abdullah

A: Why Flutter?

U: My first reason for choosing Flutter was because it’s currently trending at the tech scene. And secondly, it offers a single code-base that lets you create different apps for Android and iOS platforms.

A: What kind of materials did you use to kick start your learning with Flutter?

U: There’s this instructor that I’ve been following for quite some time. I really like the way he breaks down complex concepts into simple and easy to understand ideas. Luckily he was offering a Flutter course on Udemy. So I first took his crash course on YouTube and once I completed that, I enrolled myself in his Udemy course.

For people who are interested in taking either his Youtube crash course or the Udemy course, you can look up Maximilian Schwarzmüller.

A: Did you face any challenges when learning the ropes of Flutter?

U: I have a background in PHP Laravel so up until now the learning process has been fairly smooth. But, let’s not forget that the learning process is nowhere complete. So, there’s a possibility of coming across some minor bumps in the road.  

A: Moving onto the technical questions, can you tell me a little bit about the language that’s used for development in Flutter?

U: If you want to create wonders using the Flutter platform, you need to use Dart. Developed by Google in 2011, this object-oriented, garbage-collected language is strongly-typed and is used to build mobile, desktop, backend and web applications. 

The syntax of this programming language would be a lot quicker for you to pick up, especially if you’re a Java or Javascript developer. This is because the syntax is a mixture of Javascript, Java, and C#.  But even if you aren’t one, Dart is still a fairly easy language to learn.

Dart also has most of its components inbuilt which often doesn’t require the bridge to communicate with the native modules. 

A: So what does Flutter use to design its UI?

U: The whole UI in Flutter is built using the widgets. You can think of widgets as the core building blocks used to build the user interface of the Apps. These UI building blocks can either be a button, text, field or a list. 

To put it into perspective, when it comes to Flutter anything that you can imagine can be a widget. And hence the saying that  “in Flutter everything is a widget”. 

Widgets can be combined to form a widget tree which is an organization of the widgets starting from top to bottom.

A: Can you tell me about the types of widgets in Flutter?

U: In Flutter, you’ll find yourself dealing with two types of widgets; Stateless and Stateful.

Stateless widgets are constant and don’t have a state to be maintained. This means that these types of widgets tend to stay the same throughout the app’s lifecycle. Additionally, Stateless Widgets have the ability to update their values but not the states. 

On the other hand, Stateful Widgets are created once and have states. With these widgets, the data can be changed based on user actions.  Here, you can use the setState() method to invoke the function which updates the values of a widget. 

A: How do we communicate between the two Widgets?

U: To kickstart communication between the two widgets, you’ll first need to create a Stateful widget so that we can get hold of its state. You’ll then create a unique identifier that’s also termed as the Key

This key will serve as the reference of the sender widget for the receiver widget and it will have all the necessary information required to successfully perform the communication.

The Interview: Meeting Developer # 2

MERN stack Developer, Huzaifa Ahmed beginning to explain his approach to learning Flutter.

Photo Credits: Amna Abdullah

A: Why do you think a developer should try to learn Flutter?

H: Now that’s an interesting question! 

I’ll share some of the reasons why I decided to learn Flutter. Maybe it’ll make it easier for developers reading it to make their own decision as well. 

With Flutter, you can easily undertake dynamic and high-velocity app development. The Stateful Hot Reload lets you make changes to your code and watch it come to life in less than a second code without losing the state of the app. 

If you’re someone who wants to have the flexibility to build your own custom design, Flutter can be your go-to option. As it can easily move to a widget, rendering, animation, and gestures within the framework to give you complete control over every pixel on-screen.

Similarly, you can easily build native apps for both Android and iOS. Why? Because all the apps built using the Flutter follow platform conventions and interface details such as scrolling, navigation, icons, fonts, etc. 

Flutter also has its own library of native widgets for Android and iOS. This helps reduce the usage of external third party libraries. So whether you’re creating an app for Android or iOS, you can easily access both of the widgets for each of the platforms through the Material library for Android and the Cupertino library for iOS.

Perhaps the best part about learning Flutter is that it lets you create a Minimal Viable Product of your app. This way you can easily get feedback on your app and tweak it to the needs of your customer. 

Last but not the least, since Flutter doesn’t need a Javascript bridge, its speed is much faster. 

A: What resources did you use to kick start your learning process with Flutter?

H: I took Maximilian Schwarzmüller’s Udemy course and his crash course on YouTube. The guy really knows what he’s doing!  

Besides that, I also rely on Flutter Documentation to find answers to any questions I might have.

A: Have there been any challenges during the learning process?

H: As I’ve worked on Javascript which isn’t a strongly-typed language, development on Dart was a bit tricky for me. But besides that, the learning process has been fairly smooth.

A: Can you tell me if Flutter produces native apps?

H:  Flutter does produce native apps. It uses a graphics engine called Skia to perform all UI rendering on the application side.

The UI is drawn on the canvas —a plain surface that is the screen of the mobile device. This not only ensures predictability but also, enables the developer to have full control over the widgets and layout. The output is then adjusted according to the mobile platform ensuring the essence of being native when it comes to user experience.

A: Is Flutter limited to the mobile world only?

H:   Not at all. Flutter supports mobile (Android and iOS), web and desktop applications on a single-code base. And that’s why the saying “One code for all.” 

A: Can you explain the underlying difference between “main()” and “runApp()” functions in Flutter?

H:  The main () function came from Java-like languages. It’s where everything actually starts, without it, you can’t write any program on Flutter. You can think of it as the heart of the application

On the other hand, runApp() is an executable function.  It helps return the Widget object that would be attached to the screen as the root of the Widget Tree that will be rendered. As everything in Flutter is a Widget and every Widget is drawn on the screen of the mobile device, runApp() is the parent Node of a Tree that holds child nodes and creates a tree-like structure.

A: What exactly is Scoped Model / BLoC Pattern?

H: Let’s start with Scoped Model first. 

Scoped Model is a third party library for state management. This library helps separate your UI and business logic. The best thing about the scoped model is that you can easily control the state of any widget using Stateless Widget. 

Now moving onto the BLoC pattern. BLoC basically stands for Business Logic Components. It has a similar pattern to MVC pattern in the sense that it sits in the middle and communicates with other widgets. All of this helps in maintaining the concept of Separation of Concerns.

The Interview: Meeting Developer # 3

Android Developer, Abdul Ahad sharing his ‘Flutter’ experience.

Photo Credits: Amna Abdullah

A: Why go for Flutter?

A.A: I’ve been on Android for more than 5 years and wanted to extend my skills to become a complete mobile developer having hands-on experience on the iOS platform as well as the Android platform. But learning iOS came at a cost so I decided to switch to Flutter. This platform provided me with the opportunity to achieve what I desired by taking the shortest and most effective path.

A: So how was the learning process like? Would you say that it was challenging?

A.A: Since Dart is similar to Java to some extent, it wasn’t exactly that challenging. The only place where I ran into difficulties was with UI development. As in Android, the UI is designed, while in Flutter the UI is developed. 

A: What learning resources did you use for Flutter?

A.A: The best material for learning is Flutter’s own documentation. It’s a bit comprehensive, but it serves you the best.

A: Let’s bring on the technical questions! Can you explain the difference between Hot Restart and Hot Reload?

A.A: You can think of Hot Reload as being similar to the instant run in Android development. Now what Hot reload does is that it complies the newly added code only and updates the UI accordingly. Even though Hot Reload takes less time, it has a major drawback of not being able to work with Stateful Widgets.

Whereas, Hot Restart recompiles all of the code and gives you a fresh start. As a result of which it can take up a bit more time as compared to Hot Reload. 

A: How do we perform asynchronous programming in Flutter?

A.A:  In Flutter, asynchronous programming is achieved through the Future API and Stream API. The Stream, not only provides a sequence of asynchronous events but also, presents a data sequence that includes user actions and events. In other words, it provides you with an iteration for each of the events. 

A: Is the application deployment process user-friendly?

A.A: When it comes to Flutter, the application deployment process is very user-friendly. The Profile mode helps you measure the application’s performance. It not only provides you with the details of network requests but also, gives you information regarding the memory management, and the processor. This tool in Flutter helps ensure that your application is optimized every step of the way.

On the other hand, the Release mode is used when your app is ready to go live. All of this helps you with the optimization of the app, obfuscation of the code, singing of the certificates and the deployment of the application.

The Wrap-Up!

From highlighting the reasons to go for Flutter to deep-diving into the technical aspects of the Flutter platform itself, this interview blog gave us a first-hand perspective of three different developers at Mikaels. And while Flutter might still be a relatively young technology, it’s still worth considering, especially if you’re looking into increasing your skillset.

Leave a Reply