Bloc: Error using RxDart 0.21.0

Created on 20 Feb 2019  路  4Comments  路  Source: felangel/bloc

bloc.dart:24:44: Error: No named parameter with the name 'seedValue'.

This is most likely due to the following breaking change (from the changelog):

BehaviorSubject now has a separate factory constructor seeded()

bug

Most helpful comment

This is due to a breaking change in v0.21.0 of rxdart as @chip2n and @wm17 pointed out.

105 will address this. I'll let everyone know when I've published the change. In the meantime you can just add a restriction for rxdart in your own pubspec.yaml to resolve this.

dependencies:
  rxdart: ">=0.18.1 <0.21.0"

All 4 comments

Today I found the same mistake, and yesterday everything worked perfect,

bloc.dart:24:44: Error: No named parameter with the name 'seedValue'.
_stateSubject = BehaviorSubject(seedValue: initialState);

I've encountered the same issue. Any object that extends Bloc causes the issue, as the offending line is in the Bloc constructor (bloc.dart:24:44). It appears that BehaviorSubject<State>(seedValue: initialState) should now be BehaviorSubject.seeded(initialState) in rxdart 0.21.0 onwards.

This is due to a breaking change in v0.21.0 of rxdart as @chip2n and @wm17 pointed out.

105 will address this. I'll let everyone know when I've published the change. In the meantime you can just add a restriction for rxdart in your own pubspec.yaml to resolve this.

dependencies:
  rxdart: ">=0.18.1 <0.21.0"

Update: this is now fixed in bloc v0.9.3 so you should be able to just do a flutter packages get and the issue should be resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rsnider19 picture rsnider19  路  3Comments

1AlexFix1 picture 1AlexFix1  路  3Comments

clicksocial picture clicksocial  路  3Comments

nerder picture nerder  路  3Comments

hivesey picture hivesey  路  3Comments