This week in Flutter #26
Tags: dart, flutter, news
Published: 2021-10-25 09:21:43

This week Google [cut their cut](https://android-developers.googleblog.com/2021/10/evolving-business-model.html) for **subscriptions** on Android. They already reduced to 15% the fee for non-subscription purchases [earlier this year](https://android-developers.googleblog.com/2021/03/boosting-dev-success.html). This is good news for indie developers who can make **a bit more money** out of their app and hopefully reinvest it in the app itself.

This week I discovered some new and old packages and projects and I thought to **share** them with you. Which is the idea behind this newsletter, duh!

[Boxy](https://github.com/PixelToast/flutter-boxy) is a package that can help you with more **complex layouts** in your Flutter app. For instance, it makes it easier to layout children of a `Column` such that they have the same width as the largest child.

[Dashboy](https://github.com/mj-hd/dashboy) is a Gameboy **emulator**. Its development is in a very early stage and some features are still missing.

[Snap Scroll Physics](https://github.com/jamesblasco/snap_scroll_physics) adds a **snap** behavior to scroll views. See the example in the repository to learn when they are useful.  
  
[Flash](https://github.com/sososdk/flash) provides easily customizable **messages and alerts** for your Flutter app. In the sample project, there are a lot of examples of how you can use this package.

\- Michele Volpato

Development 🧑‍💻
-----------------

### 🔗 [Two-way communication between a WebView and a web page](https://diamantidis.github.io/2021/10/17/two-way-communication-between-flutter-webview-and-a-web-page)

I have been working with web views inside Flutter apps for some time already, and my suggestion to you all is to avoid them if it is possible. This is not a Flutter-specific topic, I would avoid them also for native mobile projects. But if you must use them, then you should know how to use JavaScript to **pass data between the app and the web page**, without the necessity to reload. [Ioannis Diamantidis](https://github.com/diamantidis) tells you how.

### 🔗 [Handling gestures in Flutter](https://blog.logrocket.com/handling-gestures-flutter-gesturedetector/)

Gestures are one of the basic functionalities of all mobile apps. You need **gestures** to **interact** with the app via the touchscreen. In Flutter, gestures are so deeply intertwined with widgets that you do not even realize you are using them, for instance when you code the `onPressed` parameter of a button. In this article by [Ivy Walobwa](https://github.com/Ivy-Walobwa), you'll learn all about gestures in Flutter, in case you need to use them outside of a standard widget.

### 🔗 [Flutter TabBar Tutorial: How to Navigate Programmatically Between Tabs](https://codewithandrea.com/articles/flutter-tab-bar-navigation/)

How do you navigate **programmatically** between tabs in Flutter? Learn it with this article by [Andrea Bizzotto](https://github.com/bizz84/).

### 🔗 [Giving superpowers to generics](https://medium.com/@schultek/giving-superpowers-to-generics-2ccb6520d66c)

This is a nice reading from [Kilian Schulte](https://github.com/schultek). It will give you a headache, but this is so different from the usual articles. In Dart, can you **decompose a generic type** into its components? And how? To get the answer, read the article and get your deserved headache.

### 🔗 [Flutter Slider widgets: A deep dive with examples](https://blog.logrocket.com/flutter-slider-widgets-deep-dive-with-examples/)

In this article by [Souvik Biswas](https://github.com/sbis04), you'll learn everything there is to know about sliders in Flutter. At the end of the article, you'll also see how to create your **own slider using custom painters**. I worked on a custom slider a couple of years ago, ad that time this article would have helped me a lot.

### 🔗 [Building Games in Flutter with Flame: Getting Started](https://www.raywenderlich.com/27407121-building-games-in-flutter-with-flame-getting-started)

As I said in the previous issue, "the best way to learn is to **make a game out of it**". In this tutorial, written by [](https://github.com/vguzzi)[Vincenzo Guzzi](https://www.raywenderlich.com/u/vguzzi), you'll learn how to use [Flame](https://flame-engine.org) to create a game in Flutter. The example used in the article is a cute early Pokemon-like game.

Backend 🗄
----------

### 🔗 [Cloud Functions with Dart and Appwrite](https://dev.to/nehanshj/cloud-functions-with-dart-and-appwrite-2nob)

If you use Appwrite as your backend system, you will be happy to know that you do not need to know JavaScript or TypeScript to write backend code. You can use **Dart** as the programming language for your **backend functions**. In a world where JavaScript enthusiasts try to fit their favorite programming language everywhere, it is nice to see a different trend. Learn more about using Dart for backend functions in this article by [](https://dev.to/nehanshj)[Nehansh Jain](https://github.com/Nehanshj).

### 🔗 [Building a Social Media App with AWS Amplify and Flutter](https://phatrabbitapps.com/series/aws-amplify)

[Rosius Ndimofor](https://github.com/trey-rosius) wrote a four-part series of articles on creating a full app using Flutter and Amplify. It's a good starting point if you want to learn how to use **Amplify** as a **backend** for your Flutter app. Go give them a thump-up.

Tools 🛠
--------

### 🔗 [How to configure a pre-commit for a flutter application](https://medium.com/@kevin.gamboa/how-to-configure-a-pre-commit-for-a-flutter-application-29dfbb853366)

You use linters and code analyzers before pushing your code to the repository, right? You spend time making sure that the code you write follows the coding guidelines of your company, both manually and by using **automated tools**. Then Friday comes. Your colleagues are waiting for you to go get a drink and you still need to commit your latest changes, so you quickly run `git commit -am 'fixed nasty bug' && git push` and you can finally leave.

Not so fast: you forgot to **format** the code, **analyze** it, and **regression test** it. Avoid this dreadful situation by configuring pre-commits with this article by [Kevin Gamboa](https://github.com/kevingamboa17).

[...]

Read the rest on [my website](https://ishouldgotosleep.com/this-week-in-flutter-26/).

[Join the Flutter and Dart newsletter](https://ishouldgotosleep.com/subscribe-to-the-newsletter-devto/) and receive it weekly in your inbox.

---