This week in Flutter #9
Tags: dart, flutter, news
Published: 2021-06-26 10:00:10

Flutter for web has been a **game-changer** for my team. When a client mentioned that they would like to have a **web version** of the **app** we had **already built** for them, we were glad we used Flutter. [Soon we will be able to create desktop apps](<https://flutter.dev/desktop>) as well, but should we?

The **desktop** experience is much **different** from the **mobile** one. A feature like **undo**, is not common in mobile applications, but it is in desktop ones. Furthermore, you have a **full keyboard** available to you on desktop, will you make your desktop app [working without a mouse](<https://www.accessibility-developer-guide.com/knowledge/keyboard-only/controlling-a-computer/>)?

What do you think?

<small>- Michele Volpato</small>

## 🧑‍💻 Development

### [Using Cubit for Managing States in Flutter](<https://neilruaro.hashnode.dev/using-cubit-for-managing-states-in-flutter>)

[Bloc](<https://pub.dev/packages/flutter_bloc>) is a well-known library that helps with state management, but using the Bloc package can result in a lot of **boilerplate**. **Cubit** is a lighter version of Bloc. [Neil Ruaro](<https://eruaro.github.io>) shows in a simple tutorial how to use it.

---

### [flutter\_witai: ^0.0.1](<https://pub.dev/packages/flutter_witai/example>)

[Amey Sunu](<https://amey.live>) published a package to query [Wit.ai](<https://wit.ai>), an API that helps with adding **natural language experience** to your products. The package is at an early stage, but I like to see a student being active in the open-source community.

---

### [Calling Native Libraries in Flutter with Dart FFI](<https://www.raywenderlich.com/21512310-calling-native-libraries-in-flutter-with-dart-ffi>)

I remember some years ago, I was working on an iOS app that used **machine learning models** to identify some specific sounds. The model, and the functions to use it, was in **C code**. It was a **nightmare**. Now, whit [Dart FFI](<https://flutter.dev/docs/development/platform-integration/c-interop>) it would be much simpler.<br>

This new tutorial on raywenderlich.com explains what **Dart FFI** is and shows how to use it to access native libraries that support C-interoperability.

---

### [Migrating an old app to Flutter 2](<https://www.youtube.com/watch?v=ALH-FbRPPws>)

The Boring Flutter Development Show is back with a new episode. In this one, Filip and Fitz **update** the old **Hacker News** app to **Flutter 2**. Not without problems. When we migrated a relatively new app to Flutter 2, we did not use the sound null safety migration tool, we [migrated manually](<https://dart.dev/null-safety/migration-guide#migrating-by-hand>), to keep everything under control.

---

### [How we make Flutter work with CallKit Call Directory](<https://dev.to/imaximova/how-we-make-flutter-work-with-callkit-call-directory-5334>)

With [CallKit](<https://developer.apple.com/documentation/callkit>) you can integrate your calling services with other call-related apps. In this (long) article the authors of the [flutter\_callkit\_voximplant](<https://pub.dev/packages/flutter_callkit_voximplant>) package explain why they **needed to create a new package**, and **how they implemented it**. It is not common to read articles about how a package is **conceived** and **implemented**.

---

## 🗄 Backend

### [Announcing HarperDB Hackathon on Hashnode!](<https://townhall.hashnode.com/announcing-harperdb-hackathon-on-hashnode>)

[Hashnode](<https://hashnode.com>), in collaboration with [HarperDB](<https://harperdb.io>), announced a **hackathon**. The goal is to build an app in your **favorite language** (Dart?) and **framework** (Flutter?), using the **HarperDB** backend service. You still have some days until the 30th of June, so hurry up.

---

## 🤷‍♂️ Others

### [Flutter Web: Should I use it? (Part 1 — SEO)](<https://dev.to/remejuan/flutter-web-should-i-use-it-part-1-seo-271k>)

[Reme Le Hane](<https://remelehane.dev>) gives his **opinion** on why **SEO is not that important** (for now) for Flutter web apps. I would add to his reasons that the usual Flutter web app **does not need** to be indexed by a search engine. Your content is probably behind a login screen, and if it is not, it is generated depending on some state the app is in. If your content is static, why using a web app? Just publish an `HTML` website. If you **need** your **app** to be **discoverable** by search engines, you could have a **marketing website** with a link to the login screen.

---

### [Version Management In Flutter](<https://medium.com/flutterdevs/version-management-in-flutter-c232b04f1919>)

My team makes and maintains Flutter apps for several clients. Some of these apps are **not** yet **migrated** to Flutter 2. Some other apps are using Flutter 2. This means that we need **two different versions of Flutter**, or even more, on the same machine to maintain such apps. How do we do it? [Flutter Version Manager](<https://pub.dev/packages/fvm>). In this article, Naveen Srivastava shows us how to get started.

---

### [Dart the perfect CLI language](<https://thedartside.noojee.dev/dart-the-perfect-cli-language>)

**Ruby** is **not** my **favorite** **language**. Let me rephrase it: Ruby is my second to last favorite language. When I need to work on a [Fastlane file](<https://docs.fastlane.tools/advanced/Fastfile/>), I first check if one of my colleagues is online, hoping to unload the job to them (they read this newsletter, so now I am in trouble). <br>

So why not using one of your **preferred languages** for** command-line applications**? [Brett Sutton](<https://github.com/bsutton>) tells us why we should use Dart.