Skip to content

Commit 1e8762b

Browse files
updated rxdart and flutter apis
1 parent 1797757 commit 1e8762b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/bloc.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MovieBloc {
1919
MovieBloc(this.api) {
2020
_results = _query.distinct().asyncMap(api.get).asBroadcastStream();
2121

22-
_log = Observable(results)
22+
_log = Stream.castFrom(results)
2323
.withLatestFrom(_query.stream, (_, query) => 'Results for $query')
2424
.asBroadcastStream();
2525
}

lib/provider.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class MovieProvider extends InheritedWidget {
1010
bool updateShouldNotify(InheritedWidget oldWidget) => true;
1111

1212
static MovieBloc of(BuildContext context) =>
13-
(context.inheritFromWidgetOfExactType(MovieProvider) as MovieProvider)
14-
.movieBloc;
13+
(context.dependOnInheritedWidgetOfExactType() as MovieProvider).movieBloc;
1514

1615
MovieProvider({Key key, MovieBloc movieBloc, Widget child})
1716
: this.movieBloc = movieBloc ?? MovieBloc(API()),

pubspec.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ dependencies:
88
# The following adds the Cupertino Icons font to your application.
99
# Use with the CupertinoIcons class for iOS style icons.
1010
cupertino_icons: ^0.1.2
11-
rxdart: ^0.16.7
11+
rxdart: ^0.23.1
12+
http: any
1213

1314
dev_dependencies:
1415
flutter_test:

0 commit comments

Comments
 (0)