DISCOVER FLUTTER — WEEK #29

Flutter Fix

New Feature In Flutter 2.0

Jelena Jovanoski
3 min readMar 16, 2021

--

Photo by Nikola Knezevic on Unsplash

One of the many improvements with the arrival of the Flutter 2 and Dart 2.12 version is the Flutter Fix feature.

Flutter Fix combines a Dart command-line tool with changes suggested by the Dart analyzer to automatically clean up deprecated APIs in your code.

This feature has also been implemented to IDE plugins for Flutter (2.0) and Dart (2.12). Depending on the IDE you use, these updates are sometimes called quick-fixes (IntelliJ, Android Studio, Eclipse) or code actions (VS Code).

With the help of Flutter Fix, you can make individual or project-wide fixes.

Bring Individual Fix Into Play

You can use any of the existing IDE platforms for individual fixes.

IntelliJ and Android Studio

Since Android Studio is my default IDE choice for Flutter, I’ll start with it.

With the help of the analyzer, deprecated API can be detected in the code. When this happens, a light bulb appears on that line of code.

By clicking on the light bulb, you get the suggested option for correction, by selecting this option, the deprecated API is automatically updated with…

--

--

Jelena Jovanoski
Jelena Jovanoski

Written by Jelena Jovanoski

On my journey to become a Flutter dev I will be sharing knowledge by writing short texts about what new know-how’s I’ve learned, in the next 30 weeks.