OT: State Management with Flutter - Something seems familiar here

After watching a video about state-management in flutter, I checked out MobX and it’s “cool code gen feature” and guess what that does…?

It replaces

class Counter {
  Counter() {
    increment = Action(_increment);

  final _value = Observable(0);
  int get value => _value.value;

  set value(int newValue) => _value.value = newValue;
  Action increment;

  void _increment() {


import 'package:mobx/mobx.dart';

part 'counter.g.dart';

class Counter = CounterBase with _$Counter;

abstract class CounterBase with Store {
  int value = 0;

  void increment() {


1 Like