Problems, you can face using flutter

Mykhailo Krentsin
2 min readOct 30, 2019

--

First of all I want to tell about some pros and cons of development using flutter.

Pros:

  1. Fast aplying changes.
  2. Customizable views.
  3. Comfortable view structures.
  4. Cross-platform.

Cons:

  1. To build for both platform you should have macbook.
  2. You should have knowledge of both platforms (minimal).
  3. Unpredictable behaviour in some cases.

So, if you want to develop using flutter framework, you should know these basic thing about it. But when you have practice every day, you can face some unexpected problems. It can be with ui, libraries or platform-dependent code. So, let`s discuss it.

  1. Right project creation. I have made some application and till the middle of its development everything was good. But when I include some library with platform-dependent code, the “magic” started. IOS app did not want to build. I got an error of absence some files. After some googling I found the solution — create via console with -i flag (flutter create -i swift app_name).
  2. Bad android dependencies. Developing some application I also used some libraries. And after including them gradle started writing error that th app uses different version of dependencies in compile time and in runtime. So, after some investigation I got a solution — target and compile sdk should be 29, and also we should have the latest version of gradle plugin and wrapper. For some strange reasons Android Studio and also flutter does not set the latest version in gradle.
  3. Lack of widget customization. As I mentioned previously, flutter has very good view structure and allows user to customize widgets as you want. BUT not all. For example, I have a screen with few radio buttons. And I want to change size of it (inner or outer radius), but I can`t do it like in other widgets, because there is no such option in Radio constructor. And Radio is not only one widget with such problem. Solution (or maybe some crutch) — copy-paste source code of this widget and make it fully customizable. But here may be some problem in future: flutter dev team can fix it and I would not know about it.
  4. Bad libraries with platform-dependent code. In pub.dev you can find big amount of libraries. Most of them directed to some UI features. But also you can find there cool libs that use platform-dependent code. But in most cases they were created by common user, that doesn`t know both platforms well. And because of it you have limited functionality. Solution — ask college to help you or write to Google support to create at least simple library with needed functionality.
  5. Dart is not good in some cases. After working with kotlin I used to write different extension function, it is amazing. But dart has not such feature. Also one of the biggest problem I faced is absence of DB ORM for SQLite, and there is no Realm database for flutter. Solution — wait…

To sum up I want to say that flutter is powerful and have big potential. But we should improve it together and share our knowledge.

--

--