Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

ReactionDisposer is not recognizing change in enum ( mobx )

After the update of flutter_mobx: ^2.0.6+1 and mobx_codegen: ^2.0.7 the ReactionDisposer is not recognizing changes in enum

 late ReactionDisposer _refreshDisposer;
 Completer<dynamic> refreshCompleter = new Completer();

 @override
  void initState() {
    super.initState();
   _refreshDisposer = reaction((_) => _vendorStore.serviceState, (_) {
      if (_ != LoadingEnum.loading) {
        refreshCompleter.complete();
        refreshCompleter = Completer();
      }
     });
  }

Observer is working fine but ReactionDisposer is not working according to change

flutter :3.0.5
Dart 2.17.6

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The new flutter_mobx: ^2.0.6+1 and mobx_codegen: ^2.0.7 has no effect on the below import

import 'package:mobx/mobx.dart';

so to work the ReactionDisposer add this plugin mobx: ^2.0.7+5 in you’r dependencies else it won’t recognize the change

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading