This article introduces six toolkits for greatly improving Flutter development efficiency.

[1] Powerful logging package

Printing logs is one of the common ways to debug Flutter while developing Flutter. However, the log printing process built into Flutter is very simple. Here is a powerful package: Logger.

Logger is an easy to use and extensible Logger that prints beautiful logs. Inspired by Android loggers, logs are divided into different levels:

logger.v("Verbose log");

logger.d("Debug log");

logger.i("Info log");

logger.w("Warning log");

logger.e("Error log");

logger.wtf("What a terrible failure log");
Copy the code

This plugin logger_flutter fixes this problem by not keeping your phone connected to your PC all the time. This plugin displays logs directly on the phone by shaking the phone or calling logConsole. open(context).

Logger pub: dev/packages/lo…

Dev /packages/lo…

[2] Convert Json data to Model

Usually, the data returned by the server interface is in JSON format. Converting json data into entity classes is very tedious, especially for complex JSON data. Here we recommend using the JsonToDart plug-in. This plug-in can be installed in both Android Studio and VS Code editors to help you convert jSON-formatted data into entity classes.

Detailed usage and installation: laomengit.com/guide/data_…

[3] View UI effects on phones with different resolutions

One of the biggest advantages of Flutter development is that it is cross-platform. When Flutter development is complete, should we buy one for every mobile phone to test?

Flutter Interact 2019 shows us how to debug applications on multiple platforms and devices simultaneously

Device_preview, the toolkit below, lets you view the UI on a single device at different resolutions.

Not only that, but it also has other cool features:

  • Changing device Direction
  • Dynamic system configuration: language, dark mode, text scaling
  • Free to adjust the resolution and security area of the device
  • Keep the application state
  • screenshots

Device_preview address: pub.dev/packages/de…

[4] Use both stable and master

When we’re developing a project, we usually build a stable version using stable Channel, but at the same time we want to play a new version, a new feature, and we have to switch to the Master Channel, but then the stable version of the project also switches, and it’s very cumbersome to switch back and forth. In addition to redownloading a large number of files with each switch, exceptions can occur, and many people experience problems with projects not compiling with each version upgrade.

How can stable channels and master channels exist at the same time? Stable Channel is used for normal development and master Channel is used for new releases.

This plugin will help you. FVM is short for Flutter Version Management, a simple CLI for managing Flutter SDK versions.

Dev /packages/fv…

[5] Internationalization Toolkit

Some people may think that my project does not need internationalization and only needs Chinese, but I still strongly recommend you to join internationalization for the following reasons:

  • In the future, no one can say for sure, whether to support internationalization is the boss’s word.
  • Increasing internationalization will not increase your workload, other languages can not be translated, directly empty.

Intl plugin can help us to complete internationalization quickly.

Use: detail laomengit.com/guide/intl/…

[6] Application upgrade function

Finally, I will introduce the application upgrade function software package developed by myself. The upgrade function should be one of the essential functions of the application program.

Currently supported on Android and iOS:

Use: detail laomengit.com/plugin/upgr…

communication

Lao Meng Flutter blog (330 controls usage + practical primer series) : laomengit.com