Flutter MobX

Ivan Terekhin
1 min readDec 3, 2019

--

Flutter is rather new technology, so, no “default” patterns are defined there. As I was solving the problem of state managment for Flutter I was considering few options:

  1. BLoC. Classical complex pattern for Flutter which is very popular in Flutter developers community. https://github.com/felangel/bloc
  2. Redux. The well known for it’s web usage library-pattern. https://github.com/brianegan/flutter_redux
  3. MobX. Also popular in Javascript world thing. But it is also presented in Flutter world. https://github.com/mobxjs/mobx.dart

I like the BLoC pattern but I just don’t like how much files are created for the simple functions. It is very clean, but too wordy for me. This is the reason why I also didn’t like Redux. It also requires many words for simple actions. So, I take MobX and I was really impressed how easy one can create Reactive application and extract business logic from UI.

I’m planning to write little series of posts about `MobX`, `Chopper`, `Hive`, `BuiltValue` usage for Flutter to create REST api simple web client with basic Token Authorization.

You can see the explanation of Flutter MobX here. So, this part is done. Bye-bye. :)

--

--

Ivan Terekhin
Ivan Terekhin

Written by Ivan Terekhin

Mobile developer (Android, iOS, Flutter), AI and GameDev enthusiast. https://www.indiehackers.com/jeuler

Responses (1)