This week in Flutter #42: Improving your code with Dart Code Metrics
This week I have been busy integrating GitLab’s code quality features in the Flutter projects I am working on. We do not use CodeClimate, and it does not seem to support Dart anyway, so I had to look into other solutions.
Dart Code Metrics analyzes and reports your code quality. You can set the report to be in a format that GitLab understands. So I added the package as a development dependency and I created a GitLab CI job for it. Now we get the report directly in the merge request UI. Useful as a pre code review step.
The only problem I have is that there is not a 1 to 1 map between the rules in this package and the static analysis tool Dart is shipped with. Dart Code Metrics is maintained by Dmitry Zhifarsky and others.
Do you have any suggestions from your experience with this package? Let me know in the comment section below.
- Michele Volpato
Development π§βπ»
π Networking In Flutter: π₯Interceptorsπ₯
This week, Dhruv Nakum explains how to add interceptors to your Flutter networking code, using the Dio package. Interceptors are useful when you need to perform some action to all networking calls your app makes. For instance a specific header.
π Send APK automatically to Telegram using Dart/Flutter
I use Firebase Distribution to reach testers and users outside of my team for builds that we do not want to distribute using Android Beta or Apple TestFlight. Giovani Albuquerque, instead, uses a Dart program he wrote that distribute an app via Telegram. That is an interesting approach.
π Pragmatic State Handling in Flutter
Sometimes we are so busy using state management packages that we forget that Flutter has already
everything we need to handle state. This article, by Erlend, reminds you
exactly this. You don’t have to avoid external packages entirely, but read the article and see how simple
it can be. If I could add anything to it, it would be the usage of InheritedWidget
instead of a
global variable.
π The Grammar of Graphics in Flutter Charts
Graphic is a flutter package that implements Leland Wilkinson’s book The Grammar of Graphics, which defines data visualization in terms of scales and layers. In this tutorial, LIN Chen shows us how to use it.
π Integration Testing in Flutter: Getting Started
Learn the difference between different types of tests in Flutter and write integration tests with this tutorial by Monikinderjit Singh.
Others π€·ββοΈ
π Chapter 2 - Mixins π¦
Vandad Nahavandipoor’s video series on Flutter keeps getting better and better. This week is Mixins time.
That’s it for this week.
If you want to comment on any of this week’s entries, you can do it in the comment section below.
Have a bug-free week,
- Michele Volpato
Leave a comment