File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class MovieBloc {
19
19
MovieBloc (this .api) {
20
20
_results = _query.distinct ().asyncMap (api.get ).asBroadcastStream ();
21
21
22
- _log = Observable (results)
22
+ _log = Stream . castFrom (results)
23
23
.withLatestFrom (_query.stream, (_, query) => 'Results for $query ' )
24
24
.asBroadcastStream ();
25
25
}
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ class MovieProvider extends InheritedWidget {
10
10
bool updateShouldNotify (InheritedWidget oldWidget) => true ;
11
11
12
12
static MovieBloc of (BuildContext context) =>
13
- (context.inheritFromWidgetOfExactType (MovieProvider ) as MovieProvider )
14
- .movieBloc;
13
+ (context.dependOnInheritedWidgetOfExactType () as MovieProvider ).movieBloc;
15
14
16
15
MovieProvider ({Key key, MovieBloc movieBloc, Widget child})
17
16
: this .movieBloc = movieBloc ?? MovieBloc (API ()),
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ dependencies:
8
8
# The following adds the Cupertino Icons font to your application.
9
9
# Use with the CupertinoIcons class for iOS style icons.
10
10
cupertino_icons : ^0.1.2
11
- rxdart : ^0.16.7
11
+ rxdart : ^0.23.1
12
+ http : any
12
13
13
14
dev_dependencies :
14
15
flutter_test :
You can’t perform that action at this time.
0 commit comments