Null exception thrown in changeNotifier after it creates the object which should not make it null #20536
Labels
area-pkg
Used for miscellaneous pkg/ packages not associated with specific area- teams.
This issue was originally filed by [email protected]
What steps will reproduce the problem?
The null object does not have a getter 'stream'.
NoSuchMethodError: method not found: 'stream'
Receiver: null
Arguments: []
STACKTRACE:
0 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
1 ChangeNotifier.changes (package:observe/src/change_notifier.dart:29:21)
For reference, line 24-30 from change_notifier.dart:
Stream<List<ChangeRecord>> get changes {
if (_changes == null) {
_changes = new StreamController.broadcast(sync: true,
onListen: observed, onCancel: unobserved);
}
return _changes.stream;
}
What is the expected output? What do you see instead?
_changes should never be null, so no exception should be thrown.
What version of the product are you using?
Dartium Version 37.0.2062.0 (287872) (64-bit)
On what operating system?
Linux
What browser (if applicable)?
Dartium Version 37.0.2062.0 (287872) (64-bit)
Please provide any additional information below.
C1
The text was updated successfully, but these errors were encountered: