Compile error when trying to use Animator in Flutter


Compiler message:

/C:/flutter/.pub-cache/hosted/ Error: No named parameter with the name 'blocs'.
      blocs: [_animatorBloc],
      ^^^^^ /C:/flutter/.pub-cache/hosted/ Context: Found this candidate, but the arguments don't match.   StateWithMixinBuilder({   ^^^^^^^^^^^^^^^^^^^^^ /C:/flutter/.pub-cache/hosted/ Error: Method not found: 'StatesRebuilder.addToListeners'.
                          ^^^^^^^^^^^^^^ /C:/flutter/.pub-cache/hosted/ Error: Method not found: 'StatesRebuilder.removeFromListeners'.
          StatesRebuilder.removeFromListeners(b,, "$hashCode");


Fix by adding statebuilder package in pubsec.yml file

states_rebuilder: 1.3.2

Answered By – Redwan

Answer Checked By – Jay B. (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.