1

I have a question if somoneone know how to make the migration to flutter_bloc 0.6, to 6.1, because I updated the version and now is all givin errors, if someone know how to do it or a bit explanation or some link to migration do it, will be great, thanks.

Some Errors:

  • The method 'dispatch' isn't defined for the type 'TabsBloc'.
  • The superclass 'Bloc<ThemeEvent, ThemeState>' doesn't have a zero argument constructor.
  • The named parameter 'builder' isn't defined.
  • The method 'dispose' isn't defined for the type 'ThemeBloc'.
Alberto Acuña
  • 512
  • 3
  • 9
  • 28

1 Answers1

3

Solutions:

  • 'dispatch' on bloc updated to 'add'.
  • 'get initialState => InitialState()' updated to ': super(InitialState())' on constructor bloc class.
  • 'Builder' on bloc updated to 'Create'.
  • 'Dispose' on bloc updated to 'Close'.
Alberto Acuña
  • 512
  • 3
  • 9
  • 28