I searched for quite a while and didn't find a clear solution to this issue on SO or other sites.
I have a Flutter test:
test('Create Repo and Read JSON', () {
Repository repository = CreateRepository();
...
}
CreateRepository()
eventually calls a method with the following code:
var jsonString = await rootBundle.loadString(vendorDataFilePath);
This results in the error: Null check operator used on a null value
None of my executed code was using a null check operator (!
) so where is this error coming from and how do I fix it?