tools
tools copied to clipboard
Constructing a memory RealNode with a non-root parent fails on the Web with dart2js + null safety
When using version 6.0.0-nullsafety.4 with null safety enabled and dart2js, RealNode's constructor throws an error when creating a node with a non-root parent.
The issue seems to be here where clock is accessed. The following error is thrown:
NoSuchMethodError: method not found: 'clock' on null
As this isn't a problem when using dartdevc, it's probably a dart2js bug. Before reporting anything there, I though it'd be a good idea to see if anyone can narrow down the issue further so the actual problem could be reported rather than this symptom.
I've made an example Flutter project to demonstrate this.
As a temporary solution, using 5.x with sound null safety disabled works.
Happy to review a PR to fix it. FWIW this repo is currently maintained in a best-effort manner, so I'm not likely to fix this unless it becomes a problem for the flutter command line tool
This seems to be fixed now. I'll close the issue.
Broken on master again (same error)