DEV Community

Cover image for Flutter, what is it? - LLF #1
Keff
Keff

Posted on • Edited on

Flutter, what is it? - LLF #1

Well "it's one of the most common abnormal heart rhythms (arrhythmias)" according to my research. Weird name choice by Google but we'll roll with it. They were called Sky before, so I don't know what is a better choice, honestly :P

Jokes aside, this is what they say they are:

Flutter is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, desktop, and embedded devices from a single codebase.
From the main page

Okay, that's a jumble of technical words right there. Let me explain that for a human.

What they mean is, they are a tool for building apps for a variety of platforms (android, iOS, website) using the same code. Whereas traditionally, you would have to write different code for each of the platforms you wanted your app to run on. For example, if my product needed to run in both android and iOS, I would have to write basically the same, two times.

This reduces the time and human power needed to get the app to the market, instead of needing two teams, you just need one.

Let's start introducing a bit of technical info now. One could say they are a framework basically, built on top of the Dart language. This means that when using Flutter, you will need to know dart. But fear not, I will be teaching you about that too.

Now that we know a bit about what Flutter is, let's see some pros and cons, when should you use it and when you should not.

Pros

Developer experience

In my experience trying out different frameworks and languages, like React, React Native, Angular, Vue, Symfony, Ionic, Nest.js, express, etc... I have to say that Flutter gives you one of the best experiences as a developer I've had. From a simple app to a big production app.

But that's subjective, I'm sure many others prefer to use React native, so in the end, it's up to each one to try different things and see which one you like the most!

Native performance

They claim to have native performance, though I have not put that to the test in any of my projects. Reading at what they say, performance seems to be quite good, you can read more here if interested.

Styling

It's really easy to style your apps, from the default material look to anything your mind could create. Needs a bit of getting used to, but once you get it, it's quite straight forwards.

Good docs

Again, one of the best docs I've come across. Plus the community behind flutter, which is really helpful.

Reliable

It never lets you down when you most need it. In contrast with other solutions, which I will not name here, but one starts with and I and finished with onic. What I'm referring to as reliable is, that the whole workflow is solid and expectable. And does not give you any problems most of the time.

Cons

It's not native

That's the biggest difference, they claim to have native performance. But that's not the only consideration to have. It also implies that new Android and iOs features will take longer to arrive in Flutter.

It's relatively young

Flutter is relatively young compared to other frameworks, but it's maturing fast as the adoption is quite good. It's also backed and used by Google, so hopefully, they won't let it die, and continuously improve it over time.

The "platform look"

It takes more work to get the platform-specific look. If you want to look like an iOS app and an Android app depending on the platform, you might end up benefiting from building 2 apps instead.

Has some weird bugs occasionally

In my time with Flutter I've come across, some small and some big problems (not many though). In some cases they've affected the main feature of the app, slowing us down a bit. But thanks to the community, I've always found some workaround, whilst I wait for the fix, which eventually gets implemented.

 Sneak peek

Here is some of the code you will see in upcoming posts:

// ... more code ...
class ForgotPasswordState extends State<ForgotPassword> {
  final _formKey = GlobalKey<FormState>();

  ForgotPasswordDto data;

  @override
  void initState() {
    super.initState();
    data = ForgotPasswordDto(email: widget.email);
  }

  @override
  Widget build(BuildContext context) {
    var isDataValid = data.valid();

    return FormPageLayout(
      appBar: EmptyAppBar(context),
      form: _forgotPasswordForm(),
      submitButton: ActionButton(
        label: 'NEXT',
        onPressed: isDataValid ? _next : null,
      ),
    );
  }

  // ... more code ...
}
Enter fullscreen mode Exit fullscreen mode

 Summary

We've seen that Flutter allows us to create apps quite fast, with good performance and easy customization. We've also seen some drawbacks of the framework and finally seen some code.

I think that's it for this one, not very interesting but, some base knowledge is required. We will start the fun stuff soon.

Thanks for reading. I hope you learned a thing or two.

And remember to comment if you have any suggestions or something you would like me to cover in these posts.


< Previous Post ... Next Post >


Top comments (0)