Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Feb 20, 2019
1 parent 2b08adc commit 703d8e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,9 @@ class ChangeNotifierProvider<T extends ChangeNotifier> extends HookWidget
() {
if (_notifier == null) {
return () {
_disposer(notifier);
if (_disposer != null) {
_disposer(notifier);
}
notifier.dispose();
};
}
Expand Down
3 changes: 3 additions & 0 deletions test/change_notifier_provider_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ void main() {
testWidgets('dispose called on unmount', (tester) async {
// TODO:
});
testWidgets('dispose can be null', (tester) async {
// TODO:
});
testWidgets(
'Changing from stateful to default constructor dispose correctly notifier from stateful',
(tester) async {
Expand Down

0 comments on commit 703d8e9

Please sign in to comment.